This question is a possible duplicate of Show N/A in datalabels, when value is null - Highcharts
and dataLabels for bar chart in Highcharts not displaying for null values in 3.0.8
but workarounds suggested have stopped working in version 5.0.7 of highcharts.
formatter: function () {
if (this.y == null) {
var chart = this.series.chart,
categoryWidth = chart.plotWidth / chart.xAxis[0].categories.length,
offset = (this.point.x) * categoryWidth + categoryWidth / 2,
text = chart.renderer.text('N/A', -999, -999).add();
text.attr({
x: chart.plotLeft + offset - text.getBBox().width / 2, //center label
y: chart.plotTop + chart.plotHeight - 8 // padding
});
} else {
return this.y;
}
}
The issue seems to be still open on github: https://github.com/highcharts/highcharts/issues/2899
http://jsfiddle.net/90amxpc1/4/
Is there a possible workaround to show something like "N/A" using formatter function or chart.renderer method for null values in column charts?