Piechart label-placement algorithm misses labels in obvious cases #304

Closed
eolsson opened this Issue Jul 12, 2011 · 3 comments

Projects

None yet

4 participants

Contributor
eolsson commented Jul 12, 2011

The new label-placement algorithm in 2.1.6 misses labels in some obvious cases, see this thread for a discussion:
http://highslide.com/forum/viewtopic.php?f=9&t=11311&start=0&st=0&sk=t&sd=a

JsFiddle example: http://jsfiddle.net/2YanB/6/

Possibly related, this example show wrong positioning of the 3% slice: http://jsfiddle.net/2YanB/7/

agraves commented Jul 12, 2011

Experiencing the same issue. This is blocking our upgrade to 2.1.6. Could possibly be related to white space in the labels?

dragouf commented Jul 13, 2011

Not problem with white space, it happen just with some values.

For example, in the first JsFiddle sample change 63 by 16 and label appear on the chart...

Collaborator

Turn out the value of the latest point affected the number of available slots. The quick fix is to find this line:

        radiusY = series.radiusY,

... and replace it with:

        radiusY = -series.center[2] / 2,

Demo: http://jsfiddle.net/2YanB/9/

For the final fix we should also remove the redundant setting of series.radiusY, and change the local name and sign of radiusY, which was based on the wrong variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment