Datalabels For Bar Chart In Highcharts Not Displaying For Null Values In 3.0.8
I've been using the following code to set dataLabels for bar charts in Highcharts... plotOptions: { bar: { dataLabels: { enabled: true, formatte
Solution 1:
Possibly bug, reported here https://github.com/highslide-software/highcharts.com/issues/2899
Workaround: use renderer http://api.highcharts.com/highcharts#Renderer.text
Solution 2:
As Sebastian points out, this is in fact a bug. However, there is an easy fix... In highcharts.src.js, simply change the call to the pick function for getting plotX and plotY in Series.prototype.alignDataLabel (lines 16132 and 16133) to:
plotX = pick(point.plotX, 0),
plotY = pick(point.plotY, 0),
rather than
plotX = pick(point.plotX, -999),
plotY = pick(point.plotY, -999),
Hope this ends up being helpful to somebody...
Post a Comment for "Datalabels For Bar Chart In Highcharts Not Displaying For Null Values In 3.0.8"