I am plotting a XY graph with two different sets of X and Y values. This is how my dataset looks -> [ X1 = {1,3,5,...}, Y1 = {104, 98, 36,....} and X2 = {2,4,6..}, Y2 = { 76, 65, 110..}].
This is the code I am using:
series1.DependentValueBinding = new System.Windows.Data.Binding("Y1"); series1.IndependentValueBinding = new System.Windows.Data.Binding("X1");
series1.DependentRangeAxis = YAxis;
series1.IndependentAxis = XAxis;
series2.DependentValueBinding = new System.Windows.Data.Binding("Y2"); series2.IndependentValueBinding = new System.Windows.Data.Binding("X2");
series2.DependentRangeAxis = YAxis;
series2.IndependentAxis = XAxis;
This code works fine for assigning two series to single Y-Axis, but when two series with different X and Y values are assigned to X-Axis it messes up the first series. It plots both Y1 = {104, 98, 36,....} and Y2 = { 76, 65, 110..} with respect to X2 = {2,4,6..}, instead of plotting X1 with respect to Y1 and X2 with respect to Y2 and having only one X and Y axis.
Please advice me on what needs to be done to assign two different set of values to single X-axis.
Thank you in advance!
-Anna