ChartSeries CreateSeries(int count)
 {
     ChartSeries series = new ChartSeries("Test");
     for (int i = 0; i < count; i++)
     {
         series.AddPoint(i, i);
     }
     return series;
 }
 public void LineChartControlSeriesTest4()
 {
     LineChartControl target = new LineChartControl();
     ObservableCollection<ChartSeries> coll = new ObservableCollection<ChartSeries>();
     ChartSeries cs = new ChartSeries("La Palma");
     coll.Add(cs);
     cs.AddPoint(0.644, 2);
     cs.AddPoint(2, 4);
     cs.AddPoint(5, 10);
     cs.AddPoint(20, 42);
     target.Series = coll;
     Assert.AreEqual(4, target.Chart.Series["La Palma"].Points.Count);
     Assert.AreEqual(0.644, target.Chart.Series["La Palma"].Points[0].XValue);
     Assert.AreEqual(42, target.Chart.Series["La Palma"].Points[3].YValues[0]);
     target.Dispose();
 }
 public void LineChartControlSeriesTest5()
 {
     LineChartControl target = new LineChartControl();
     ObservableCollection<ChartSeries> coll = new ObservableCollection<ChartSeries>();
     ChartSeries cs = new ChartSeries("La Palma");
     cs.AddPoint(555, 888);
     coll.Add(cs);
     cs = new ChartSeries("Lanzarote");
     cs.AddPoint(18, 4);
     cs.AddPoint(19, 3);
     coll.Add(cs);
     target.Series = coll;
     Assert.AreEqual(1, target.Chart.Series["La Palma"].Points.Count);
     Assert.AreEqual(2, target.Chart.Series["Lanzarote"].Points.Count);
     Assert.AreEqual(555, target.Chart.Series["La Palma"].Points[0].XValue);
     Assert.AreEqual(18, target.Chart.Series["Lanzarote"].Points[0].XValue);
     target.Dispose();
 }
 public void LineChartControlBindingTest7()
 {
     LineChartControl target = new LineChartControl();
     ObservableCollection<ChartSeries> coll = new ObservableCollection<ChartSeries>();
     target.Series = coll;
     ChartSeries cs = new ChartSeries("Benidorm");
     coll.Add(cs);
     for (int i = 0; i < 100; i++)
     {
         cs.AddPoint(i, i * 2);
     }
     Assert.AreEqual(100, target.Chart.Series["Benidorm"].Points.Count);
     cs.Points.Clear();
     Assert.AreEqual(0, target.Chart.Series["Benidorm"].Points.Count);
     target.Dispose();
 }