ASP.Net Chart Control -----Bar and Column Charts
2020-12-13 02:34
// Populate series data Random random = new Random(); for(int pointIndex = 0; pointIndex 10; pointIndex++) { Chart1.Series["Series1"].Points.AddY(Math.Round((double)random.Next(45, 95),0)); Chart1.Series["Series2"].Points.AddY(Math.Round((double)random.Next(5, 75),0)); Chart1.Series["Series3"].Points.AddY(Math.Round((double)random.Next(5, 95),0)); Chart1.Series["Series4"].Points.AddY(Math.Round((double)random.Next(35, 95),0)); }string chartTypeName == "StackedArea"//"StackedArea100"//"StackedColumn"/"StackedColumn100"/"StackedBar"/"StackedBar100"
Chart1.Series["Series1"].ChartType = (SeriesChartType)
Enum.Parse( typeof(SeriesChartType), chartTypeName, true
);
Chart1.Series["Series2"].ChartType = (SeriesChartType)
Enum.Parse( typeof(SeriesChartType), chartTypeName, true
);
Chart1.Series["Series3"].ChartType = (SeriesChartType)
Enum.Parse( typeof(SeriesChartType), chartTypeName, true
);
Chart1.Series["Series4"].ChartType = (SeriesChartType)
Enum.Parse( typeof(SeriesChartType), chartTypeName, true );
文章标题:ASP.Net Chart Control -----Bar and Column Charts
文章链接:http://soscw.com/essay/25842.html