In the next Code,
When you run the program,
Line graph, matching one comes sweeps.
What's wrong?
What can I change?
public MainPage()
{
InitializeComponent();
SeriesMapping sm1 = new SeriesMapping();
BarSeriesDefinition d1 = new BarSeriesDefinition();
sm1.SeriesDefinition = d1;
sm1.LegendLabel = "Bar Series";
sm1.CollectionIndex = 0;
ItemMapping im1 = new ItemMapping();
im1.DataPointMember = DataPointMember.YValue;
sm1.ItemMappings.Add(im1);
SeriesMapping sm2 = new SeriesMapping();
SplineSeriesDefinition d2 = new SplineSeriesDefinition();
sm2.SeriesDefinition = d2;
sm2.LegendLabel = "Spline Series";
sm2.CollectionIndex = 1;
ItemMapping im2 = new ItemMapping();
im2.DataPointMember = DataPointMember.YValue;
sm2.ItemMappings.Add(im2);
RadChart1.SeriesMappings.Add(sm1);
RadChart1.SeriesMappings.Add(sm2);
List<double[]> itemsSource = new List<double[]>
{
new double[]{10,11,12,13,14,15,16,17,18,19,10,11,12,13,14,15,16,17,18,19},
new double[]{0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9}
};
this.RadChart1.DefaultView.ChartArea.AxisX.AutoRange = false;
//this.RadChart1.DefaultView.ChartArea.AxisX.AddRange(1, 5, 1);
this.RadChart1.DefaultView.ChartArea.AxisX.MinValue = 1;
this.RadChart1.DefaultView.ChartArea.AxisX.MaxValue = 21;
this.RadChart1.DefaultView.ChartArea.AxisX.Step = 1;
this.RadChart1.ItemsSource = itemsSource;