srinidhi
Posts: 1
Joined: Wed Mar 03, 2021 10:19 am

Not able to set exact min and max interval

Hi,

Min and max value has not applied on the chart properly. Refer the below fiddle, here the min value is set as 400 for x and y axis but it is plotted from 0 in y-axis and from 500 in x-axis.
https://jsfiddle.net/oad7m1pL/2/

Expectation: Min value should start from 400 strictly

Note: We do not want to set the interval to get it fixed



Thanks,
Srinithi
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Not able to set exact min and max interval

Hello srinidhi!

Welcome to our forum and thanks for contacting us with your question!

As you can read in our API:
If the startOnTick option is true (default), the min value might be rounded down.

This is the reason why you setting min and max values strictly didn't work. When we set startOnTick property to false it works as you want.

API references:
https://api.highcharts.com/highcharts/yAxis.min
https://api.highcharts.com/highcharts/yAxis.max
https://api.highcharts.com/highcharts/yAxis.startOnTick
https://api.highcharts.com/highcharts/yAxis.endOnTick

Demo:
https://jsfiddle.net/BlackLabel/5douvmw3/

Let me know if that was what you were looking for!
Best regards!
Dominik Chudy
Highcharts Developer

Return to “Highcharts Usage”