When using line graph for current month values it is not alligned to the X axis

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Stephan on 17th June 2014
Hi,

I use RGraph for my weatherstation. For my monthly and yearly graph the lines are not alligned to the X-axis when the month isn't complete. For example, on the 15th of the month the X-axis shows all days of the month, but the actual markers don't line up with the those dates. Only when I populate the rest of the data with 0 (instead of null) it lines up correctly.

How can I get it to align when the month/year isn't complete yet?

Examples can be seen at:

Month: io-node.net/weatherstation/index.php?action=month
Year: io-node.net/weatherstation/index.php?action=year

Regards,

Stephan
Posted by Richard on 17th June 2014
Inastead of+ leaving null values without data which will result in it being "undefined" - set it to null.

www.rgraph.net/fiddle/view/a-line-chart-with-aligned-tickmarks





Richard
Posted by Stephan on 17th June 2014
Thanks, I couldn't find a solution for it. It works perfectly.

Regards,

Stephan

Add a reply




« Back to message list