Plotting against the right Y-Axis.

Mar 5, 2012 at 8:29 AM

Hi All,

I am facing one probelm.

In my application i have many plot lines which will plot with  the left Y-Axis  and the bottom X-Axis.

In the same plot I need to draw with the right Y-Axis and the bottom X-Axis.

But when i draw using  the line series  my plot is always taking the left Y-Axis Scale. Below is the sample code for Y-Axis. It is always taking the Left Y-Axis Scale only,

S1.Point.Add(new DataPoint(i,i+10)).  where S1 is the line series.

Can anyone please assist me and share the code for drawing the plot with the Left Y-Axis VS Bottom X-Axis and Right Y-Axis VS Bottom X-Axis. Bottom X-Axis is common for  both the Y-Axis.

Is the  above feature not available in Oxyplot.? Please help me.

Thanks & Regards

Vijender.

 

Mar 5, 2012 at 11:34 AM

I am using the property Axes.Key to give an axis a name and then reference to this name using the properties XAxisKey, YAxisKey of a series.

a.Key = "yAxesName";
...
YAxisKey = "yAxesName";

 

Franz

Mar 5, 2012 at 12:10 PM
Edited Mar 5, 2012 at 12:12 PM

Yes, linking series and axes by AxisKey is the way to do it. However, you can only manipulate the first added vertical axis from the plot area.

This will hopefully be fixed with issue 9945, Synchronized axes.