Ejemplo n.º 1
0
 public void SetSeriesStylesProperty()
 {
     Chart chart = new Chart();
     PieSeries series = DefaultSeriesToTest as PieSeries;
     series.IndependentValueBinding = new Binding();
     series.ItemsSource = new int[] { 4, 5, 6 };
     List<Style> styles = new List<Style>();
     styles.Add(new Style(typeof(Control)));
     styles.Add(new Style(typeof(DataPoint)));
     series.StylePalette = styles;
     TestAsync(
         chart,
         () => chart.Series.Add(series),
         () => series.StylePalette.RemoveAt(0),
         () => chart.Refresh());
 }
Ejemplo n.º 2
0
 public void AddNewPointToCategoryAxis()
 {
     Chart chart = new Chart();
     DataPointSeries series = new ColumnSeries();
     series.IndependentValueBinding = new Binding();
     ObservableCollection<int> itemsSource = new ObservableCollection<int>();
     itemsSource.Add(5);
     series.ItemsSource = itemsSource;
     TestAsync(
         chart,
         () => chart.Series.Add(series),
         () => itemsSource.Add(10),
         () => chart.Refresh());
 }
Ejemplo n.º 3
0
 public void RefreshOneSeries()
 {
     Chart chart = new Chart();
     DataPointSeries series = new ColumnSeries();
     series.ItemsSource = new int[] { 0 };
     chart.Series.Add(series);
     TestAsync(
         chart,
         () => chart.Refresh(),
         () => AssertSeriesCorrect(chart, series));
 }
Ejemplo n.º 4
0
 public void AxisInAxisCollection()
 {
     Chart chart = new Chart();
     DateTimeAxis dateTimeAxis = new DateTimeAxis();
     dateTimeAxis.Orientation = AxisOrientation.Horizontal;
     dateTimeAxis.IntervalType = DateTimeIntervalType.Days;
     dateTimeAxis.Interval = 1;
     chart.Axes.Add(dateTimeAxis);
     DataPointSeries series = new LineSeries();
     series.DependentValueBinding = new Binding("Day");
     series.IndependentValueBinding = new Binding();
     series.ItemsSource = new DateTime[] { new DateTime(2008, 1, 1), new DateTime(2008, 1, 2) };
     chart.Series.Add(series);
     TestAsync(
         chart,
         () => chart.Refresh());
 }
Ejemplo n.º 5
0
 public void RefreshNoSeries()
 {
     Chart chart = new Chart();
     TestAsync(
         chart,
         () => chart.Refresh(),
         () => AssertSeriesCorrect(chart));
 }