I'm implementing highcharts in my site, however is proving challenging from a presentation point of view.
My data loads fine, but for the series, some of the values are zeros. I would like to display the label when not zero, as otherwise it becomes hard to read.
I'm trying to do something like this:
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: this.value == 0 ? false : true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white' }
}
}
But this is not working. I've tried using only 'this' instead of value but also doesn't pick it up. I haven't been able to find a default option from the library that would allow me to do this without having to create custom code.
I've checked a few approaches, but the zeros are in one of the series. So i still want to present the label for the values that aren't zeros for the group.
I think when one says this.y it takes the value of the entire group, and not the individual series...
Any suggestions? Clearly I'm doing something wrong!