Adjust line chart marks on 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 Brandon on 10th October 2013
Line graphs have one too many notches on the x-axis (or the arrangement is wrong). Is there some way to fix this?

Example: nimonpro.com/rgraph_example.jpg
Notice that near the edges the notches look as though they were meant to line up with the labels (though I understand the labels are probably supposed to go between the notches). If I could reduce the number of notches, they would line up, or if I could move them I may be able to make them line up between the labels as intended.

Any help would be great!
Posted by RGraph support on 11th October 2013
Hi there,

Because your first point is on the Y axis that you need to set the number of X axis ticks to one less than the number of data points that you have. So set chart.numxticks to 23 in the first chart and 6 in the second.




Richard, RGraph Support
Posted by RGraph support on 11th October 2013
Hi there,

Oh - and if you use chart.hmargin it will throw the alignment out as well.


Richard, RGraph Support
Posted by Enter your name... on 4th November 2013
I didn't know what those were even called to search for them.

Thanks guys. Worked great.

Add a reply




« Back to message list