Plotting against the right Y-Axis.

Oystein Bjorke 6 years ago 0
This discussion was imported from CodePlex

vdepa wrote at 2012-03-05 08:29:

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



ffiala wrote at 2012-03-05 11:34:

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";



anomistu wrote at 2012-03-05 12:10:

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.