Class PieSeries
PieSeries displays data as a proportion of the whole.PieSeries are most commonly used to make comparisons among a set of given data.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public class PieSeries : CircularSeries, ISegmentSelectable
Remarks
PieSeries does not have any axis. The segments in PieSeries can be exploded to a certain distance from the center using ExplodeAll property.
Examples
<syncfusion:PieSeries ItemsSource="{Binding Data}" XBindingPath="Year" YBindingPath="Value">
</syncfusion:PieSeries>
PieSeries series1 = new PieSeries();
series1.ItemsSource = viewmodel.Data;
series1.XBindingPath = "Year";
series1.YBindingPath = "Value";
chart.Series.Add(series1);
Constructors
PieSeries()
Initializes a new instance of the PieSeries.
Declaration
public PieSeries()
Fields
CircularCoefficientProperty
The DependencyProperty for CircularCoefficient property.
Declaration
public static readonly DependencyProperty CircularCoefficientProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
CircularCoefficient
Gets or sets a value that specifies the ratio of pie size with respect to chart area. This is a bindable property.
Declaration
public double CircularCoefficient { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The value ranges from 0 to 1. |
Segment
Gets for internal usage.
Declaration
public PieSegment Segment { get; }
Property Value
Type | Description |
---|---|
PieSegment |
Methods
CreateDataMarker(DataMarkerSeries, Double, Double, Double, Double)
Create the data marker for doughnut series.
Declaration
protected override ChartDataLabel CreateDataMarker(DataMarkerSeries series, double xVal, double yVal, double angle, double radius)
Parameters
Type | Name | Description |
---|---|---|
DataMarkerSeries | series | series |
System.Double | xVal | xvalue |
System.Double | yVal | yvalue |
System.Double | angle | angle |
System.Double | radius | radius |
Returns
Type | Description |
---|---|
ChartDataLabel | ChartAdornment |
Overrides
CreateSegment()
Creates an instance of series segment.
Declaration
protected override ChartSegment CreateSegment()
Returns
Type | Description |
---|---|
ChartSegment | Returns the instance of corresponding series segment. |
Overrides
Remarks
This customization is not supported for fast type series and technical indicators.
Examples
This sample shows how to call the CreateSegment() method to customize the line series segments.
public class LineSeriesExt : LineSeries
{
protected override ChartSegment CreateSegment()
{
return new LineSegmentExt();
}
}
public class LineSegmentExt : LineSegment
{
public override UIElement CreateVisual(Size size)
{
// Write your customization code here.
}
public override void Update(IChartTransformer transformer)
{
// Write your customization code here.
}
}
CreateSegments()
Creates the segments of PieSeries.
Declaration
public override void CreateSegments()
Overrides
CreateTransformer(Size, Boolean)
Return IChartTranform value based upon the given size.
Declaration
protected override IChartTransformer CreateTransformer(Size size, bool create)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | size | size |
System.Boolean | create | bool |
Returns
Type | Description |
---|---|
Syncfusion.UI.Xaml.Charts.IChartTransformer |
Overrides
OnDataSourceChanged(IEnumerable, IEnumerable)
Called when ItemsSource changed.
Declaration
protected override void OnDataSourceChanged(IEnumerable oldValue, IEnumerable newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | oldValue | old value |
System.Collections.IEnumerable | newValue | new value |
Overrides
SetExplodeAll()
Virtual method for ExplodeAll.
Declaration
protected override void SetExplodeAll()
Overrides
SetExplodeRadius()
Virtual Method for ExplodeRadius.
Declaration
protected override void SetExplodeRadius()