Ejemplo n.º 1
0
 public void DrawBar(
     string title,
     IEnumerable x,
     IEnumerable y,
     Models.Graph.Axis.AxisType xAxisType,
     Models.Graph.Axis.AxisType yAxisType,
     Color colour,
     bool showOnLegend)
 {
     ColumnXYSeries series = new ColumnXYSeries();
     if (showOnLegend)
         series.Title = title;
     series.FillColor = ConverterExtensions.ToOxyColor(colour);
     series.StrokeColor = ConverterExtensions.ToOxyColor(colour);
     series.ItemsSource = this.PopulateDataPointSeries(x, y, xAxisType, yAxisType);
     series.XAxisKey = xAxisType.ToString();
     series.YAxisKey = yAxisType.ToString();
     this.plot1.Model.Series.Add(series);
 }
Ejemplo n.º 2
0
 public void DrawBar(
     string title,
     IEnumerable x,
     IEnumerable y,
     Models.Graph.Axis.AxisType xAxisType,
     Models.Graph.Axis.AxisType yAxisType,
     Color colour,
     bool showOnLegend)
 {
     if (x != null && y != null)
     {
         ColumnXYSeries series = new ColumnXYSeries();
         if (showOnLegend)
             series.Title = title;
         series.FillColor = OxyColor.FromArgb(colour.A, colour.R, colour.G, colour.B);
         series.StrokeColor = OxyColor.FromArgb(colour.A, colour.R, colour.G, colour.B);
         series.ItemsSource = this.PopulateDataPointSeries(x, y, xAxisType, yAxisType);
         series.XAxisKey = xAxisType.ToString();
         series.YAxisKey = yAxisType.ToString();
         this.plot1.Model.Series.Add(series);
     }
 }