I am trying to add a pie chart to my winforms application - but the only chart I can find in my toolbox is the regular bar chart.
Is there any way to form this bar chart as a pie chart or add a pie-chart component to my toolbox by using some existing .net 4 framework libraries (without installing any new libraries such as "DevExpress" etc)?
You can change the chart type by selecting the series in property window or use the following sample code
chart1.Series["Business"].ChartType =
System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Pie;
In .NET 4 and later I think you have MS Chart in the framework. Read more here: http://code.msdn.microsoft.com/Samples-Environments-for-b01e9c61
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With