score:1

Accepted answer

In Highcharts API we can read:

max: number, null

...

If the endOnTick option is true, the max value might be rounded up. (...)

As a solution disable startOnTick and endOnTick options or use tickPositioner function to calculate and set tick postion manually, for example:

            yAxis: {
                ...,
                tickPositioner: function(){
                    var ticks = [],
                    step = (dataset.max - dataset.min) / 4;

                  for (var i = dataset.min; i <= dataset.max; i += step) {
                    ticks.push(i);
                  }

                  return ticks;
                }
            }

Live demo: https://jsfiddle.net/BlackLabel/ev5hz0pk/

API Reference:

https://api.highcharts.com/highcharts/yAxis.max

https://api.highcharts.com/highcharts/yAxis.tickPositioner


Related Query

More Query from same tag