Explode segments in WinUI Chart (SfCircularChart)
9 Jul 20262 minutes to read
Exploding a segment is used to draw attention to a specific area of the circular chart. The following properties are used to explode the segments in the circular chart.
- ExplodeAll - Used to explode all the segments of the series.
- ExplodeIndex - Used to explode any specific segment.
- ExplodeRadius - Used to define the explode distance.
- ExplodeOnTap - Used to explode the segment when the segment is clicked.
Explode Index
<chart:SfCircularChart>
<!-- Configure additional chart elements -->
<chart:PieSeries
x:Name="PieSeries"
ItemsSource="{Binding Data}"
ExplodeIndex="2"
ExplodeRadius="10"
XBindingPath="Utilization"
YBindingPath="ResponseTime"/>
</chart:SfCircularChart>SfCircularChart chart = new SfCircularChart();
// Configure additional chart elements
PieSeries series = new PieSeries()
{
ItemsSource = new ViewModel().Data,
XBindingPath = "Utilization",
YBindingPath = "ResponseTime",
ExplodeIndex = 2,
ExplodeRadius = 10
};
chart.Series.Add(series);
NOTE
By default, the ExplodeRadius value is zero. So, you need to define the ExplodeRadius value when you set the ExplodeIndex or ExplodeAll.
Explode All
<chart:SfCircularChart>
<!-- Configure additional chart elements -->
<chart:PieSeries ExplodeAll="True"
ExplodeRadius="15"
XBindingPath="Category"
ItemsSource="{Binding Data}"
YBindingPath="Value">
</chart:SfCircularChart>SfCircularChart chart = new SfCircularChart();
// Configure additional chart elements
PieSeries series = new PieSeries()
{
ItemsSource = new ViewModel().Data,
XBindingPath = "Category",
YBindingPath = "Value",
ExplodeAll = true,
ExplodeRadius = 15
};
chart.Series.Add(series);