Move Labels on Individual Pie or Donut Slice (High

2019-09-14 23:04发布

问题:

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.

标签: highcharts