RGraph is a JavaScript charts library based on HTML5 SVG and canvas. RGraph is mature (over 15 years old) and has a wealth of features making it an ideal choice to use for showing charts on your website.

More »


Get the latest version of RGraph (version 6.18, 1st June 2024) from the download page. You can read the changelog here. There's also older versions available, minified files and links to cdnjs.com hosted libraries.

More »


RGraph can be used for free under the GPL or if that doesn't suit your situation there's an inexpensive (£129) commercial license available.

More »

Having the yaxisScaleMin property set to 1 throws off the Y-axis scaling

Posted by larrybud at 15:38 on Tuesday 13th September 2022 [link]
I have a series of data all with integer values. I have the Y Axis inverted, and the yaxisScaleMin set to 1, and the max value set to automatic.

Note the scaling of the Y axis. The values are "off", 1,3,5,6,8,10....
Attached image:
Attached image

Posted by Richard at 16:09 on Tuesday 13th September 2022 [link]
This is because you now have a range of 9 (1 -> 10) instead of 10 (0 -> 10) and it's showing 5 labels. And 9 / 5 equals 1.8 - ie not a whole number - so the scale will be 1, 2.8, 4.6, 6.4, 8.2 and 10. But... the default is not to show decimals so those numbers get rounded to the numbers that you're seeing - 1,3,5,6,8,10.

So the solution here is to allow the use of decimals which you can do with:

yaxisScaleDecimals: 1

[Replies are closed]