Hello,
is it possible to create datalabels on a DataSeriesItem with low and high set and display only the high value?
I’ve want to create a callout at the high point (end of the bar)
Thanks in advance.
Hello,
is it possible to create datalabels on a DataSeriesItem with low and high set and display only the high value?
I’ve want to create a callout at the high point (end of the bar)
Thanks in advance.
Hi,
I don’t think there’s API for enabling datalabels on high or low only. I did a quick test and noticed that you can create a complex datalabel formatter like this:
PlotOptionsColumnrange columnRange = new PlotOptionsColumnrange();
columnRange.getDataLabels().setEnabled(true);
columnRange.getDataLabels().setFormatter("return (this.y === this.point.high)?this.y:''");
That will only show data for label in high value.
You can also make the formatter more complex by adding a whole javascript function like in the following example:
columnRange.getDataLabels().setFormatter("function() { if (this.y === this.point.high) { return this.y ; }else{ return ''; } }");
Hope this helps,
Guille
Thank you so much. This solved my problem.
Glad to hear that!