1、WebChartControl
a、Adding a webchartcontrol to a page at runtime
SqlDataSource dataSource = new SqlDataSource
("Data Source=YourServerName;Initial Catalog=YourDatabaseName; Persist Security Info=True;User ID=YourUserID;Password=YourPassword",
"SELECT SalesPerson, Product, SUM(Sales) Sales FROM Products");
WebChartControl chart = new WebChartControl();
chart.Width = 500;
chart.Height = 300;
chart.DataSource = dataSource;
chart.SeriesDataMember = "SalesPerson";
chart.SeriesTemplate.ArgumentDataMember = "Product";
chart.SeriesTemplate.ValueDataMembers.AddRange(new string[] { "Sales" });
chart.SeriesTemplate.View = new StackedBarSeriesView();
this.Controls.Add(chart);