Hightcharts max 19 is rounded op to 20

I created a line chart in Highcharts and i want the maximum to be 19. So i found the option max

yAxis: {
   max: 19;
}

But Highcharts rounds the max to 20 and i realy don't want this becouse 19 is the highest value posible for this variable. I've tested it with 21 and this results in a max of 30.

How can i for Highcharts to respect my max?

Answers:

Answer

This is probably due to the endOnTick setting. The default value is true which means that the y axis scale will end on a tick. If your data is between 0 and 19 there will be ticks at 0, 5, 10, 15 and 20.

Test with endOnTick set to false: http://jsfiddle.net/mVvGj/

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.