hi,
this is my code:
double[] yValues = { 15, 60, 12, 13 };
string[] xValues = { "September", "October", "November", "December" };
// Create a pie chart
Chart chart = new Chart();
// Build a pie series
Series series = new Series("Default");
series.ChartType = SeriesChartType.Pie;
series["PieLabelStyle"] = "Disabled";
chart.Series.Add(series);
// Define the chart area
ChartArea chartArea = new ChartArea();
ChartArea3DStyle areaStyle = new ChartArea3DStyle(chartArea);
areaStyle.Rotation = 0;
Axis yAxis = new Axis(chartArea, AxisName.Y);
Axis xAxis = new Axis(chartArea, AxisName.X);
// Bind the data to the chart
chart.Series["Default"].Points.DataBindXY(xValues, yValues);
// Save the chart as a 300 x 200 image
chart.Width = new System.Web.UI.WebControls.Unit(300, System.Web.UI.WebControls.UnitType.Pixel);
chart.Height = new System.Web.UI.WebControls.Unit(200, System.Web.UI.WebControls.UnitType.Pixel);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
chart.SaveImage(System.IO.Stream.Null);
chart.SaveImage(ms, ChartImageFormat.Png);
Session["GraficoClientePorTipo"] = ms.ToArray();
divInferior.Controls.Add(new LiteralControl("<div>" + chart.GetHtmlImageMap("GraficoClientePorTipo") + "</div>"));
my problem is the chart doens't appear in my div and I can't put <asp:chart> in the side page.aspx.
thanks for help