Highcharts Show/hide Datalabel Of Selected Point
Still have a big trouble on working with highcharts datalabels. Now I need to show and hide datalabels by clicking on the points. Tried this: plotOptions: { series: {
Solution 1:
Pass the updated property into the Point.update()
method.
point:{
events:{
click: function(){
// determine toggle state// on first click this.dataLabels is undefined...var e = !this.dataLabels || this.dataLabels.enabled ? false : true;
this.update({
dataLabels:{
enabled: e
}
});
}
}
}
Here's an example which toggles them.
Post a Comment for "Highcharts Show/hide Datalabel Of Selected Point"