$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Chart Control for C# Windows Forms
Design Bar, Pie, Line, Area, Polar, Radar and Scatter for C# Windows Forms application
Home > WinForms UI Controls > User Manual > Chart Property in C#

Pie Series of Chart for WinForms C# Tutorial

The Series Types of Chart View is a collection of Chart Series, including Area, SplineArea, Bar, Line, Spline, Scatter point, Combined series. The Chart control provides two primary functions to Chart series. One is a collection used to stand for the specific data and the other is to visualize the data by using a predefined model. The following are the series types that the Chart support, including Bar, Pie, Line, Area, Donut, Scatter, Polar, Stock, Radar, Categorical or Polar.
The Pie Series is completely different from all other series, because the Pie Series do not require axes. The Pie Series make every data point to visible pie slices through proportional arc size directly to the magnitude of the raw data point’s value. The pie series are only valid when it is in the context of Pie AreaType. Pie slices stand for data in one dimension rather than the other series that stand for data in 2 dimensions.

How to Create a Pie Chart in C#

The following are the C# code sample that shows the steps for creating a pie chart, whose data is populated with Pie series

this.chart1.AreaType = ChartAreaType.Pie;
PieSeries series = new PieSeries();
series.DataPoints.Add(new PieDataPoint(60, "UK"));
series.DataPoints.Add(new PieDataPoint(90, "Japan"));
series.DataPoints.Add(new PieDataPoint(35, "Italy"));
series.DataPoints.Add(new PieDataPoint(85, "US"));
series.ShowLabels = true;

Customizing Properties of Pie Series for Chart

  • Range, this is a property used to customize the angle and display the chart in a full circle or in a partial circle. There are two parameters, StartAngle and SweepAngle.
  • StartAngle, this property is used to customize the start angle of the pie segments that will be drawn. And the pie slices are always set to render in the counter-clockwise direction.
  • SweepAngle, this property is used to display the chart in a full circle or in a partial circle. The below C# code snippet shows how the PieSeries customize the Range property

AngleRange range = new AngleRange(150, 210);
series.Range = range;
  • DisplayLabels, this property is used to control if visualizing the labels above each point or not
  • RadiusFactor, this property is used to increase or decrease the diameter of the series. When the value of the RadiusFactor is less than 1, the radius of the series will be decreased, in contrast, when the value of the RadiusFactor is greater than 1, the radius of the series will be increased.
  • OffsetFromCenter, this property is used to offset a pie segment from the rest of the slices.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls