tags:

views:

86

answers:

1

I'm looking through the asp:chart documentation and I don't see where you set a "ChartType" on a ChartArea. How do you make a simple 2D PieChart? I don't see where you set the type at all.

Note: Adapt Gordon's answer to ASP.NET. Close enough to get me on the correct path. Thanks.

+1  A: 
using System.Windows.Forms.DataVisualization.Charting;
...

// Populate series data
double[]    yValues = {65.62, 75.54, 60.45, 34.73, 85.42};
string[]    xValues = {"France", "Canada", "Germany", "USA", "Italy"};
chart1.Series["Default"].Points.DataBindXY(xValues, yValues);

// Set Pie chart type
chart1.Series["Default"].ChartType = SeriesChartType.Pie;

// Set labels style
chart1.Series["Default"]["PieLabelStyle"] = "Outside";
Gordon Bell
Aha. ChartType is on the Series. -1 cool point for me.
tyndall