RGraph drawing API - The X axis object

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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 Roy on 11th May 2014
Hello,

I have been trying to draw an X Axis for a bar graph using RGraph drawing API - The X axis object. The Axis is drawn appropriately with a tick marks appearing exactly at the center. I would like to move the tick mark to the right, to encompass more members in a given category.

For example in www.rgraph.net/docs/howto-multiple-xaxis.html example, Team A and Team B contain exactly 5 members each. Is there a way to move the tick mark and have Team A with 7 members and Team B with 3, instead.

The library is wonderful and has been really helpful.

Thank You, Richard.
Posted by Richard on 12th May 2014
Hi

Yes you can do that by having ten labels - the Team A/B label and also blanks so that the labels appear in the right place. To get the correct tickmarks you'll need to draw them yourself though like this:

www.rgraph.net/fiddle/view/a-bar-chart-with-an-offset-y-axis-object





Richard

Add a reply




« Back to message list