I am wanting to prevent the display of decimal values on a y-axis of an area chart I have configured.
When my chart initially shows with all series showing, I see:
But after filtering out some of the series to show, I see the y axis start showing decimal values like so:
My yAxis config is as follows:
yAxis: {
gridLineColor: 'transparent',
allowDecimals: false,
type: 'logarithmic',
minorTickInterval: 1,
lineWidth: 0,
gridLineWidth: 0,
minorGridLineWidth: 0
},
I wondered if this had something to do with being a logarithmic scale, but when I comment out the type
option to revert to using a default scale, it makes no difference, I observe the same behaviour.
Is there a way to prevent decimals showing and only have whole values showing?
Thanks
Update:
So I have replicated in a fiddle here -> https://jsfiddle.net/parky12/cn5mdzea/
Seems this is related to being on a logarithmic scale.
If you disable the low series, then decimals appear on the axis.
Is there a way to prevent these showing?