How can I draw the X axis at the bottom (not zero), when I have negative values?


« 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 Anna on 29th January 2018
Hello,

I draw line graph using splines. I can have negative values there and want to draw X-axis in the bottom(Where I have the lowest Y value).

I apply next settings:
graph.Set('chart.xaxispos', 'bottom');
graph.Set('chart.ymin', -12);

And I expect to see X-axis in Y = -12, but have it in 0 value.

Can you assist with that? Should not I set up some extra settings?

Thank you
Posted by Richard on 29th January 2018
Hi there,

You'll need to use the drawing API X axis objects for that like this:

www.rgraph.net/tests/canvas.line/xaxis-bottom.html

Richard
Posted by Anna on 29th January 2018
Thank you for your quick response and an illustrative example!

Add a reply




« Back to message list