Getting more than 1 Y- axis in single chart

May 20, 2014 at 3:15 PM
I have defined below chart and using c# i am creating lineseries but if i create two lineseries i get two Y-axis. Below is c# code
<Charting:Chart x:Name="OperationalEfficiencyChart"                                                  DataContextChanged="OperationalEfficiencyChart_DataContextChanged">
                            </Charting:Chart>
 for (int i = 0; i < Yeararry.Length; i++) // Yeararry has two record
                {
                    List<OperationalEfficiency> DataList = _operationefficiencyList.Where(x => x.Year == Convert.ToInt32(Yeararry[i])).ToList();
                    var OperationalEfficiencyChartSeries = new LineSeries();

                    OperationalEfficiencyChartSeries.Title = DataList[0].Year.ToString();
                    OperationalEfficiencyChartSeries.IsSelectionEnabled = false;

                    OperationalEfficiencyChartSeries.ItemsSource = DataList;

                    OperationalEfficiencyChartSeries.IndependentValueBinding = new Binding();
                    OperationalEfficiencyChartSeries.DependentValueBinding = new Binding();

                    OperationalEfficiencyChartSeries.IndependentValueBinding.Path = new PropertyPath("Region");
                    OperationalEfficiencyChartSeries.DependentValueBinding.Path = new PropertyPath("OperationalEfficiencyCount");


                    OperationalEfficiencyChartSeries.DependentRangeAxis = new LinearAxis() { Minimum = -2, Orientation = AxisOrientation.Y, };

                    OperationalEfficiencyChart.Series.Insert(i, OperationalEfficiencyChartSeries);
                }
I want n number of series with single Y and X axis

Thanks in advance
Jun 25, 2014 at 12:06 PM
Hi Rahul,

did you get the solution to show dual Y-Axis in chart of WinRT Toolkit? I am also having same requirement and if you find solution could you please share with me?

Thanks in Advance.

Thanks,
Madhan Mamidala.
mamidalamadhan@gmail.com.
Dec 18, 2014 at 8:14 AM
Hi Madhan/Rahul,

Did you get solution to above issue? I am also facing same problem.Kindly share solution.

Regards,
Ritesh Mathur
Dec 22, 2014 at 2:24 AM
hi Rahul ,


Create LinearAxis above the for loop .
LinearAxis v1= new LinearAxis() { Minimum = -2, Orientation = AxisOrientation.Y, };

for (int i = 0; i < Yeararry.Length; i++) // Yeararry has two record
..
.
OperationalEfficiencyChartSeries.DependentRangeAxis =v1;

.
.
}