javascript - Highcharts: drawDataLabels wrapper function for pie chart not working -
i have written wrapper function drawing data labels of pie chart. in wrapper function, have updated distance attribute of data labels. when give size attribute in user options, distance not work properly.
http://jsfiddle.net/8l5dxa6c/1/
(function(h) { h.wrap(h.seriestypes.pie.prototype, 'drawdatalabels', function(drawdatalabels) { this.chart.series[0].options.datalabels.distance = -30; drawdatalabels.apply(this); }); })(highcharts);
the distance has updated in wrapper function required in scenario. can reason drawdatalabels fail when size specified in json options?
Comments
Post a Comment