//Create multiple axis here.
ChartAxis axis = this.chart.PrimaryYAxis;
ChartAxis axis1 = new ChartAxis(ChartOrientation.Vertical);
ChartAxisLayout layout1 = new ChartAxisLayout();
ChartAxisLayout layout2 = new ChartAxisLayout();
chart.Axes.Add(axis1);
layout1.Axes.Add(axis1);
layout2.Axes.Add(axis);
chart.ChartArea.YLayouts.Add(layout1);
chart.ChartArea.YLayouts.Add(layout2);
// Binding series to axis here
ChartSeries Series1 = new ChartSeries("Series1", ChartSeriesType.Line);
Series1.Points.Add(0, 500);
.. ..
.. ..
Series1.YAxis = axis;
ChartSeries Series2 = new ChartSeries("Series2 ", ChartSeriesType.Line);
Series2.Points.Add(0, 7000000);
.. ..
.. ..
Series2.YAxis = axis1;
|
ChartSeries series = new ChartSeries("series1", ChartSeriesType.Line);
series.Points.Add(1, 1330);
series.Points.Add(2, 1148);
series.Points.Add(3, 303);
series.Points.Add(4, 237);
this.chart.Series.Add(series);
ChartSeries series1 = new ChartSeries("series2", ChartSeriesType.Line);
series1.Text = series1.Name;
series1.Points.Add(1, 133000);
series1.Points.Add(2, 114800);
series1.Points.Add(3, 310300);
series1.Points.Add(4, 213700);
this.chart.Series.Add(series1);
// Enable the break mode
this.chart.PrimaryYAxis.BreakRanges.BreaksMode = ChartBreaksMode.Auto;
this.chart.PrimaryYAxis.BreakInfo.LineType = ChartBreakLineType.Straight;
|
[C#]
//Set break amount to 15% of total range
this.chart.PrimaryYAxis.BreakRanges.BreakAmount = 0.15;
//Break axis range automatically
this.chart.PrimaryYAxis.BreakRanges.BreaksMode = ChartBreaksMode.Auto;
|