Class PieSeries
The PieSeries displays data as a proportion of the whole. Its most commonly used to make comparisons among a set of given data.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public class PieSeries : CircularSeries, INotifyPropertyChanged
Remarks
To render a series, create an instance of the pie series class, and add it to the Series collection.
It Provides options for PaletteBrushes, Fill, Stroke,
EnableTooltip - Tooltips display information while tapping or mouse hovering over the segment. To display the tooltip on the chart, you need to set the EnableTooltip property as true in the PieSeries, and also refer to the TooltipBehavior property.
Data Label - Data labels are used to display values related to a chart segment. To render the data labels, you need to set the
Animation - To animate the series, set True to the EnableAnimation property.
Selection - To enable the data point selection in the series, create an instance of the DataPointSelectionBehavior and set it to the
LegendIcon - To customize the legend icon using the LegendIcon, and LegendIconTemplate properties.
Examples
<chart:SfCircularChart>
<chart:PieSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"/>
</chart:SfCircularChart>
Constructors
PieSeries()
Initializes a new instance of the PieSeries class.
Declaration
public PieSeries()
Fields
ExplodeAllProperty
The DependencyProperty for ExplodeAll property.
Declaration
public static readonly DependencyProperty ExplodeAllProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
ExplodeIndexProperty
The DependencyProperty for ExplodeIndex property.
Declaration
public static readonly DependencyProperty ExplodeIndexProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
ExplodeOnTapProperty
The DependencyProperty for ExplodeOnTap property.
Declaration
public static readonly DependencyProperty ExplodeOnTapProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
ExplodeRadiusProperty
The DependencyProperty for ExplodeRadius property.
Declaration
public static readonly DependencyProperty ExplodeRadiusProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
ExplodeAll
Gets or sets a value indicating whether to explode all the pie slices (segments).
Declaration
public bool ExplodeAll { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
<chart:SfCircularChart>
<chart:PieSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ExplodeAll = "True"/>
</chart:SfCircularChart>
ExplodeIndex
Gets or sets the index of segment in series to be exploded.
Declaration
public int ExplodeIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | This property takes an System.Int32 value, and its default value is |
Examples
<chart:SfCircularChart>
<chart:PieSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ExplodeIndex = "2"/>
</chart:SfCircularChart>
ExplodeOnTap
Gets or sets a value indicating whether segment slices will explode on mouse click or tap.
Declaration
public bool ExplodeOnTap { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | if |
Examples
<chart:SfCircularChart>
<chart:PieSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ExplodeOnTap = "True"/>
</chart:SfCircularChart>
ExplodeRadius
Gets or sets a value that can be used to define the radial distance for the exploded segment from the center.
Declaration
public double ExplodeRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts double values, and the default value is 30. |
Examples
<chart:SfCircularChart>
<chart:PieSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ExplodeRadius = "50"/>
</chart:SfCircularChart>
Segment
Declaration
public PieSegment Segment { get; }
Property Value
Type |
---|
PieSegment |