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

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -