Search code examples
highcharts

How to get only whole numbers on the y-axis?


I'm using highcharts. When I get small numbers in my series the y-axis starts using floating numbers. How can I force it to only use whole numbers regardless of my data?

Note: I do have a minimum set to "4", so even when there is one result to y-axis range will be 0-4.


Solution

  • Set allowDecimals: false, see API.