One Y axis on the left and other on the right

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 A.S. on 16th October 2013
Hi!

In a graph with two y axis, is that possible to set 1 y axis on the left and the other on the right of that graph?

Many Thanks!
Posted by RGraph support on 16th October 2013
Hi there,

Yes - you can set the alignment of the Y axis. The API ref for the Y axis is here:

www.rgraph.net/docs/drawing-api-yaxis.html


Richard, RGraph Support
Posted by A.S. on 16th October 2013
Ok, thanks.

I see that I can set:
.Set('chart.yaxispos', 'right')

But this seems not result.

I also set this, because an y position is needed:
RGraph.Drawing.YAxis('cvs', line.gutterLeft/2)

How can I correctly set the second yaxis on the right of the xaxis?

Many Thanks!
Posted by RGraph support on 16th October 2013
Hi there,

If you want to set the position to be on the right hand side of the canvas you need to specify a coordinate on the right of the canvas eg:

x = line.canvas.width - 25;


Richard, RGraph Support
Posted by A.S. on 16th October 2013
Great! Thank you!

Add a reply




« Back to message list