Skip to content

This sample demonstrates how to visualize the exploded segment in the pie chart in WinUI.

Notifications You must be signed in to change notification settings

SyncfusionExamples/How-to-explode-the-pie-chart-slice-in-WinUI-SfCircularChart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

How-to-explode-the-pie-chart-slice-in-WinUI-SfCircularChart

The WinUi Chart provides a simple way to achieve specific visual effects by exploding segments in a pie Chart. You can control the explosion of a particular data point’s segment by adjusting the ExplodeIndex property of the chart series. Additionally, the ExplodeRadius property allows you to define how far the segment will be exploded from the center of the chart.The ExplodeOnTap property enables the segments to be exploded when they are touched or clicked by the user. The following code example demonstrates how to explode the segment in the pie chart:

XAML

   <chart:PieSeries ItemsSource="{Binding Data}"
                         XBindingPath="Name"
                         YBindingPath="GDP"
                         ExplodeIndex="2"
                         ExplodeRadius="20"
                         ExplodeOnTap="True"
                         ShowDataLabels="True" >
   </chart:PieSeries>

C#

  PieSeries pieSeries = new PieSeries ();
  pieSeries .ItemsSource = "{Binding Data}";
  pieSeries .XBindingPath = "Name";
  pieSeries .YBindingPath = "GDP";
  pieSeries .ExplodeIndex = 2;
  pieSeries .ExplodeRadius = 20;
  pieSeries .ExplodeOnTap = true;
  pieSeries .ShowDataLabels = true;
 
  circularChart.Series.Add(pieSeries );
  this.Content = circularChart;

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages