corelibraries-devexpress-dot-xtracharts-dot-pieseriesview-318dedfa.md
Specifies whether a user can explode pie slices with the mouse pointer at runtime.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public bool RuntimeExploding { get; set; }
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Property RuntimeExploding As Boolean
| Type | Description |
|---|---|
| Boolean |
true , if a user can drag pie slices; otherwise, false.
|
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;
}
Private Sub OnLoad(ByVal sender As Object, ByVal e As EventArgs)
chartControl1.RuntimeHitTesting = True
Dim view As PieSeriesView = TryCast(chartControl1.Series(0).View, PieSeriesView)
view.RuntimeExploding = True
view.ExplodedDistancePercentage = 20
End Sub
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;
}
Protected Sub WebChartControl1_ObjectSelected(ByVal sender As Object, ByVal e As HotTrackEventArgs)
Dim series As Series = TryCast(e.Object, Series)
If series IsNot Nothing Then
Dim explodedPoints As ExplodedSeriesPointCollection = (CType(series.View, PieSeriesViewBase)).ExplodedPoints
Dim point As SeriesPoint = CType(e.AdditionalObject, SeriesPoint)
explodedPoints.ToggleExplodedState(point)
End If
e.Cancel = series Is Nothing
End Sub
See Also