Skip to main content
A newer version of this page is available. .

PieSeriesView.RuntimeExploding Property

Specifies whether a user can explode pie slices with the mouse pointer at runtime.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v22.2.dll

NuGet Package: DevExpress.Charts

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public bool RuntimeExploding { get; set; }

Property Value

Type Description
Boolean

true, if a user can drag pie slices; otherwise, false.

Remarks

The RuntimeExploding property is in effect when the ChartControl.RuntimeHitTesting property is set to true.

The animation below shows how a user can move out a pie slice at runtime:

Use the the PieSeriesViewBase.ExplodedDistancePercentage property to increase/decrease the distance between an exploded slice and the rest of the pie.

private void OnLoad(object sender, EventArgs e) {
    chartControl1.RuntimeHitTesting = true;
    PieSeriesView view = chartControl1.Series[0].View as PieSeriesView;
    view.RuntimeExploding = true;
    view.ExplodedDistancePercentage = 20;
}

For the WebChartControl, enable RuntimeExploding and add points that a user clicks to the PieSeriesViewBase.ExplodedPoints collection in the WebChartControl.ObjectSelected event handler.

Note

View Demo Online: Pie Series View

protected void WebChartControl1_ObjectSelected(object sender, HotTrackEventArgs e) {
    Series series = e.Object as Series;
    if (series != null) {
        ExplodedSeriesPointCollection explodedPoints = ((PieSeriesViewBase)series.View).ExplodedPoints;
        SeriesPoint point = (SeriesPoint)e.AdditionalObject;
        explodedPoints.ToggleExplodedState(point);
    }
    e.Cancel = series == null;
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RuntimeExploding 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