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

eolsson opened this Issue Jul 12, 2011 · 3 comments


None yet

4 participants

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:

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...


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