1. 先画好chart
2.生成图片
ChartReportInfo chartReport = new ChartReportInfo();
chartReport.ContentId = chart.ClientID + "_" + id.ToString(); // chart 是页面上chart控件id
chartReport.ImageName = chart.ClientID + "_" + id.ToString() + ".png";
chartReport.ImageMapName = "Map_" + chart.ClientID + "_" + id.ToString();
chartReport.ImageMemoryStream = new System.IO.MemoryStream();
chart.SaveImage(chartReport.ImageMemoryStream, ChartImageFormat.Png);
string filePath = "c:\imgs\1.png";
if (File.Exists(filePath))
{
File.Delete(filePath);
}
chart.SaveImage(filePath, ChartImageFormat.Png);
chartReport.ImageMap = chart.GetHtmlImageMap(chartReport.ImageMapName);
即可
ImageLocation
http://www.cnblogs.com/Renn/archive/2010/07/09/2048353.html