Skip to main content

ChartView.SplitPosition Property

Gets or sets a value that specifies which data points should appear in the secondary chart of a Pie of Pie or Bar of Pie chart type.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v24.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

double SplitPosition { get; set; }

Property Value

Type Description
Double

A Double value that determines which data points should be displayed in the secondary chart.

Remarks

Use the ChartView.SplitType property to determine how to split a Pie of Pie or Bar of Pie chart, and then set the SplitPosition property (or the ChartView.SecondPiePoints property if the custom split is specified) to adjust the number of data points that appear in the secondary chart.

Note

Currently, the SpeadsheetControl does not display the Pie of Pie or Bar of Pie chart types. However, they can be loaded and stored in supported formats, and you can create and modify them programmatically.

The image below shows the Pie of Pie chart with the secondary chart containing the four smallest values (the workbook is opened in Microsoft® Excel®).

PieOfPieChart

Example

The example below demonstrates how to create a Pie of Pie chart and specify the number of data points that should appear in the secondary chart by setting the ChartView.SplitType and ChartView.SplitPosition properties. In this example, the last four values will be displayed in the secondary pie chart.

View Example

Worksheet worksheet = workbook.Worksheets["chartTask6"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Create a Pie of Pie chart and specify its position.
Chart chart = worksheet.Charts.Add(ChartType.PieOfPie, worksheet["B2:C11"]);
chart.TopLeftCell = worksheet.Cells["E2"];
chart.BottomRightCell = worksheet.Cells["L16"];

// Specify the number of data points to be displayed in the secondary chart (the last four values).
chart.Views[0].SplitType = OfPieSplitType.Position;
chart.Views[0].SplitPosition = 4;

// Show data labels as percentage values.
chart.Views[0].DataLabels.ShowPercent = true;

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SplitPosition property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also