Exemplo n.º 1
0
 /// <summary>
 /// Creates a chart displaying a supported <see cref="ChartType"/> with the given data. Includes a chart and a table, and allows exporting the data to CSV.
 /// Assuming <paramref name="seriesCollection"/> has multiple elements, draws multiple sets of Y values on the same chart.
 /// </summary>
 /// <param name="setup">The setup object for the chart.</param>
 /// <param name="seriesCollection">The data series collection.</param>
 /// <param name="colors">The colors to use for the data series collection. Pass null for default colors. If you specify your own colors, the number of
 /// colors does not need to match the number of series. If you pass fewer colors than series, the chart will use random colors for the remaining series.
 /// </param>
 public Chart(ChartSetup setup, IEnumerable <DataSeries> seriesCollection, IEnumerable <Color> colors = null)
 {
     this.setup            = setup;
     this.seriesCollection = seriesCollection.ToArray();
     this.colors           = colors;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a chart displaying a supported <see cref="ChartType"/> with the given data. Includes a chart and a table, and allows exporting the data to CSV.
 /// </summary>
 /// <param name="setup">The setup object for the chart.</param>
 /// <param name="series">The data series.</param>
 /// <param name="color">The color to use for the data series.</param>
 public Chart(ChartSetup setup, DataSeries series, Color?color = null)
     : this(setup, series.ToSingleElementArray(), colors : color != null ? color.Value.ToSingleElementArray() : null)
 {
 }