0

I have a pie chart in Highcharts that reduces each slice to create a "fan" effect. Each slice is working great. However, the labels need to be handled as well. I tried the following:

new Highcharts.chart(div, pieOptions,
    function(chartObj) {
        var j = 0;

        $.each(chartObj.series[0].data, function(i, point) {

            point.labelDistance = j;

            j -= 25;

        });

});

This actually updates the label distance properly in the logged out data, but not in the visual itself. I've also tried reloading the chart each time.

Here is a jsfiddle: https://jsfiddle.net/s2pdroze/1/

Summary: I'm looking for each label on each slice to move slight more inward on each iteration.

Tyler Mills
  • 353
  • 1
  • 3
  • 15
  • Can you post your code in something like jsfiddle in order to look at it? – Hackerman May 10 '17 at 15:28
  • You should be able to change your dataLabel using point.update() method. However, I am not sure why you cannot change your points label distance in the initial options: http://jsfiddle.net/weskwor9/ It would be great if you could post live example so we will be able to see what exactly your problem is. – Grzegorz Blachliński May 10 '17 at 15:33
  • @GrzegorzBlachliński I have added a JSFiddle. – Tyler Mills May 10 '17 at 15:42
  • So this is something you would like to achieve? http://jsfiddle.net/s2pdroze/4/ – Grzegorz Blachliński May 10 '17 at 16:09
  • @GrzegorzBlachliński Actually with a decrement instead of an increment it's working. I ended up resetting the counter every third slice and it works great with no overlapping. Thanks! – Tyler Mills May 10 '17 at 18:18

0 Answers0