Class DoughnutSeries
DoughnutSeries displays data as a proportion of the whole. DoughnutSeries are most commonly used to make comparisons among a set of given data.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.SfChart.UWP.dll
Syntax
public class DoughnutSeries : CircularSeriesBase, ICloneable, ISegmentSelectable, INotifyPropertyChanged
Examples
<syncfusion:DoughnutSeries ItemsSource="{Binding Data}" XBindingPath="Year" YBindingPath="Value">
</syncfusion:DoughnutSeries>
DoughnutSeries series1 = new DoughnutSeries();
series1.ItemsSource = viewmodel.Data;
series1.XBindingPath = "Year";
series1.YBindingPath = "Value";
chart.Series.Add(series1);
Constructors
DoughnutSeries()
Called when instance created for DoughnutSeries
Declaration
public DoughnutSeries()
Fields
CapStyleProperty
Using a DependencyProperty as the backing store for CapStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty CapStyleProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
CenterViewProperty
The DependencyProperty for CenterView property
Declaration
public static readonly DependencyProperty CenterViewProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
DoughnutCoefficientProperty
The DependencyProperty for DoughnutCoefficient property.
Declaration
public static readonly DependencyProperty DoughnutCoefficientProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
DoughnutHoleSizeProperty
Using a DependencyProperty as the backing store for DoughnutHoleSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty DoughnutHoleSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
DoughnutSizeProperty
The DependencyProperty for DoughnutSize property.
Declaration
public static readonly DependencyProperty DoughnutSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
IsStackedDoughnutProperty
Using a DependencyProperty as the backing store for IsStackedDoughnut. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty IsStackedDoughnutProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MaximumValueProperty
Using a DependencyProperty as the backing store for MaximumValue. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MaximumValueProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SegmentSpacingProperty
Using a DependencyProperty as the backing store for GapRatio.This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SegmentSpacingProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TrackBorderColorProperty
Using a DependencyProperty as the backing store for brushTrackBorderColor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TrackBorderColorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TrackBorderWidthProperty
Using a DependencyProperty as the backing store for TrackBorderWidth. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TrackBorderWidthProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TrackColorProperty
Using a DependencyProperty as the backing store for RimColor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TrackColorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Properties
CapStyle
Gets or sets the capstyle that specifies the start and end points of doughtnut segment. This is a bindable property.
Declaration
public DoughnutCapStyle CapStyle { get; set; }
Property Value
Type |
---|
DoughnutCapStyle |
CenterView
Gets or sets the view to be added to the center of the DoughnutSeries
.
Declaration
public ContentControl CenterView { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Controls.ContentControl |
DoughnutCoefficient
Gets or sets a value that specifies the inner circular radius of the DoughnutSeries. This is a bindable property.
Declaration
public double DoughnutCoefficient { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The double value ranges from 0 to 1. |
DoughnutSize
Gets or sets the size of the DoughnutSeries
.
Declaration
public double DoughnutSize { get; set; }
Property Value
Type |
---|
System.Double |
InnerRadius
Gets the inner radius of DoughnutSeries.
Declaration
public double InnerRadius { get; }
Property Value
Type |
---|
System.Double |
IsStackedDoughnut
Gets or sets a value indicating whether to draw stacked doughnut segment.
Declaration
public bool IsStackedDoughnut { get; set; }
Property Value
Type |
---|
System.Boolean |
MaximumValue
Gets or sets the maximum value for the doughnut segment when stacked doughnut is used.
Declaration
public double MaximumValue { get; set; }
Property Value
Type |
---|
System.Double |
Segment
Gets for internal usage
Declaration
public DoughnutSegment Segment { get; }
Property Value
Type |
---|
DoughnutSegment |
SegmentSpacing
Gets or sets a value that specifies the gap ratio for the doughnut segments. This is a bindable property.
Declaration
public double SegmentSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The double value ranges from 0 to 1. |
TrackBorderColor
Gets or sets the brush that specifies the track area border color for stacked doughnut. This is a bindable property.
Declaration
public Brush TrackBorderColor { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
TrackBorderWidth
Gets or sets a value that specifies the track area border width for stacked doughnut. This is a bindable property.
Declaration
public double TrackBorderWidth { get; set; }
Property Value
Type |
---|
System.Double |
TrackColor
Gets or sets the brush that specifies the track area segment color for stacked doughnut. This is a bindable property.
Declaration
public Brush TrackColor { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
Methods
CloneSeries(DependencyObject)
Returns the instance of DoughnutSeries series.
Declaration
protected override DependencyObject CloneSeries(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | obj | object |
Returns
Type |
---|
Windows.UI.Xaml.DependencyObject |
Overrides
CreateAdornment(AdornmentSeries, Double, Double, Double, Double)
Method implementation for create Adornments.
Declaration
protected override ChartAdornment CreateAdornment(AdornmentSeries series, double xVal, double yVal, double angle, double radius)
Parameters
Type | Name | Description |
---|---|---|
AdornmentSeries | series | |
System.Double | xVal | |
System.Double | yVal | |
System.Double | angle | |
System.Double | radius |
Returns
Type |
---|
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 doughnut segments.
Declaration
public override void CreateSegments()
Overrides
CreateTransformer(Size, Boolean)
Return IChartTransformer value from 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 |
---|
Syncfusion.UI.Xaml.Charts.IChartTransformer |
Overrides
GetDoughnutHoleSize(DependencyObject)
Returns the doughnut hole size.
Declaration
public static double GetDoughnutHoleSize(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | obj | object |
Returns
Type |
---|
System.Double |
OnDataSourceChanged(IEnumerable, IEnumerable)
Called when ItemsSource property 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
SetDoughnutHoleSize(DependencyObject, Double)
Sets the doughnut hole size.
Declaration
public static void SetDoughnutHoleSize(DependencyObject obj, double value)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | obj | object |
System.Double | value | value |
SetExplodeAll()
Virtual method for ExplodeAll.
Declaration
protected override void SetExplodeAll()
Overrides
SetExplodeIndex(Int32)
Method implementation for ExplodeIndex.
Declaration
protected override void SetExplodeIndex(int i)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | i |
Overrides
SetExplodeRadius()
Virtual Method for ExplodeRadius.
Declaration
protected override void SetExplodeRadius()