Reputation: 27
How can I do something like this? I want to replace the zero with something else. Highcharts (I just edited the picture). Thank you so much
Upvotes: 1
Views: 78
Reputation: 20536
To alter certain axis label values to show something else you could set a axis.labels.formatter
function (API). For example (JSFiddle):
yAxis: {
labels: {
formatter: function() {
if(this.value == 0)
return '0.1 >'
else
return this.axis.defaultLabelFormatter.call(this)
}
}
}
Here, if the value is 0
we output the label as 0.1 >
, otherwise we return the default label.
Upvotes: 2