21.1 (EAP/Beta)
20.2
20.1
19.2
19.1
18.2
18.1
17.2

# PieSeriesView.Rotation Property

Gets or sets the angle by which pie slices are rotated.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.2.dll

## Declaration

``````[XtraChartsLocalizableCategory(XtraChartsCategory.Layout)]
public int Rotation { get; set; }``````
``````<XtraChartsLocalizableCategory(XtraChartsCategory.Layout)>
Public Property Rotation As Integer``````

## Property Value

Type Description
Int32

An integer value that specifies the angle, in degrees.

## Remarks

The angle, which is specified by this property, is measured in degrees and is counterclockwise.

0 30 -30

## Examples

The following example demonstrates how to create a ChartControl with a series of the PieSeriesView type, and add this chart to a form at runtime.

Note that this series view type is associated with the SimpleDiagram type, and you should cast your diagram object to this type, in order to access its specific options.

##### NOTE

A complete sample project is available at https://github.com/DevExpress-Examples/how-to-create-a-pie-chart-e1189

``````using System;
using System.Windows.Forms;
using DevExpress.XtraCharts;
// ...

namespace Series_PieChart {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e) {
// Create an empty chart.
ChartControl pieChart = new ChartControl();

// Create a pie series.
Series series1 = new Series("A Pie Series", ViewType.Pie);

// Populate the series with points.

// Add the series to the chart.

// Format the the series labels.
series1.Label.TextPattern = "{A}: {VP:p0}";

// Adjust the position of series labels.
((PieSeriesLabel)series1.Label).Position = PieSeriesLabelPosition.TwoColumns;

// Detect overlapping of series labels.
((PieSeriesLabel)series1.Label).ResolveOverlappingMode = ResolveOverlappingMode.Default;

// Access the view-type-specific options of the series.
PieSeriesView myView = (PieSeriesView)series1.View;

// Show a title for the series.
myView.Titles[0].Text = series1.Name;

// Specify a data filter to explode points.
DataFilterCondition.GreaterThanOrEqual, 9));
DataFilterCondition.NotEqual, "Others"));
myView.ExplodeMode = PieExplodeMode.UseFilters;
myView.ExplodedDistancePercentage = 30;
myView.RuntimeExploding = true;
myView.HeightToWidthRatio = 0.75;

// Hide the legend (if necessary).
pieChart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;

// Add the chart to the form.
pieChart.Dock = DockStyle.Fill;