Explode Segments in WinUI Chart (SfPyramidChart)
22 Jun 20221 minute to read
Exploding a segment is used to pull attention to a specific area of the pyramid. The following properties are used to explode the segments in the pyramid chart.
- ExplodeIndex - Used to explode any specific segment.
- ExplodeOffset - Used to define the explode distance of segment.
- ExplodeOnTap - Used to explode the segment when segment is tapped/clicked.
<chart:SfPyramidChart x:Name="chart"
ExplodeIndex="3"
ExplodeOffset="30"
ItemsSource="{Binding Data}"
XBindingPath="Category"
YBindingPath="Value">
</chart:SfPyramidChart>
SfPyramidChart chart = new SfPyramidChart();
chart.SetBinding(SfPyramidChart.ItemsSourceProperty, new Binding() { Path = new PropertyPath("Data") });
chart.XBindingPath = "Category";
chart.YBindingPath = "Value";
chart.ExplodeIndex = 3;
chart.ExplodeOffset = 30;
. . .
this.Content = chart;