private void radioChartTypeChanged(object sender, System.EventArgs e) { RadioButton rb = (RadioButton)sender; if (rb.Checked) { Chart2DTypeEnum ct = (Chart2DTypeEnum)rb.Tag; c1Chart1.ChartGroups[0].ChartType = ct; int maxSeries = 10; bool stackable = true; // special cases that limit the number of series shown. // this allows the demo to use the same data for all charts. switch (ct) { case Chart2DTypeEnum.Pie: stackable = false; break; case Chart2DTypeEnum.HiLo: case Chart2DTypeEnum.Bubble: stackable = false; maxSeries = 2; break; case Chart2DTypeEnum.HiLoOpenClose: case Chart2DTypeEnum.Candle: stackable = false; maxSeries = 1; break; } checkStacked.Enabled = stackable; ChartGroup grp = c1Chart1.ChartGroups[0]; ChartDataSeriesCollection sl = grp.ChartData.SeriesList; int slim = sl.Count; for (int s = 0; s < slim; s++) { if (s < maxSeries) { sl[s].Display = SeriesDisplayEnum.Show; } else { sl[s].Display = SeriesDisplayEnum.Exclude; } } } }
private DataCollection(Chart2DTypeEnum chart2dType) { dataSeriesList = new ArrayList(); chartType = chart2dType; }
//private string colorTablename = "BaseColors.txt";//ĬÈÏÅäÉ«°å //private string timeformat = "yyyy-MM-dd HH:mm:ss"; public DataCollection() { dataSeriesList = new ArrayList(); chartType = Chart2DTypeEnum.LineChart; }