Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="ChartPanel" />
 /// class.
 /// </summary>
 /// <param name="sourcebinding">The sourcebinding.</param>
 public ChartPanel(IChartBinding sourcebinding)
     : this()
 {
     SourceModel   = new SourceModel(sourcebinding);
     Configuration = SourceModel.GetSeriesConfiguration();
     ChartData     = new SeriesModel(sourcebinding);
     DataMetric    = SourceModel.GetMetric();
     TitleInfo     = new TitleInfo(DataMetric.Data?.CopyToDataTable()?.TableName);
     DataSeries    = new DataSeries(ChartData);
     Series.Add(DataSeries);
     Titles.Add(TitleInfo.GetChartMainTitle());
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChartPanel" /> class.
 /// </summary>
 /// <param name="data">The data.</param>
 /// <param name="seriesconfig">The seriesconfig.</param>
 public ChartPanel(IEnumerable <DataRow> data, ISeriesConfig seriesconfig)
     : this()
 {
     SourceModel   = new SourceModel(data, seriesconfig);
     Configuration = SourceModel.GetSeriesConfiguration();
     ChartData     = new SeriesModel(data, seriesconfig);
     DataMetric    = SourceModel.GetMetric();
     TitleInfo     = new TitleInfo(DataMetric.Data?.CopyToDataTable()?.TableName);
     DataSeries    = new DataSeries(ChartData);
     Series.Add(DataSeries);
     Titles.Add(TitleInfo.GetChartMainTitle());
 }