Skip to main content

PieSeriesView.RuntimeExploding Property

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

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[TypeConverter(typeof(BooleanTypeConverter))]
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
[XtraSerializableProperty]
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;
}
See Also