Class DoughnutSeries
Represents a doughnut chart. This chart is similar to PieSeries except the DoughnutSeries contains a hole at the center of the series.
Inherited Members
Namespace: Syncfusion.SfChart.XForms
Assembly: Syncfusion.SfChart.XForms.dll
Syntax
public class DoughnutSeries : PieSeries, IThemeElement
Remarks
DoughnutSeries requires ItemsSource, XBindingPath and YBindingPath properties to be set to render the chart.
Examples
SfChart chart = new SfChart();
DoughnutSeries series = new DoughnutSeries();
ObservableCollection<ChartDataPoint> Data = new ObservableCollection<ChartDataPoint>
{
new ChartDataPoint("2006",28),
new ChartDataPoint("2007",68),
new ChartDataPoint("2010",38)
};
series.ItemsSource = Data;
chart.Series.Add(series);
Constructors
DoughnutSeries()
Initializes a new instance of the DoughnutSeries class.
Declaration
public DoughnutSeries()
Fields
CapStyleProperty
Gets or sets the value to select the cap style property. This is a bindable property.
Declaration
public static readonly BindableProperty CapStyleProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
CenterViewProperty
Gets or sets the view to be added to the center of the doughnut series. This is a bindable property.
Declaration
public static readonly BindableProperty CenterViewProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DoughnutCoefficientProperty
Gets or sets the value that resides between 0 to 1, handles the inner radius of the doughnut series. This is a bindable property.
Declaration
public static readonly BindableProperty DoughnutCoefficientProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
IsStackedDoughnutProperty
Gets or sets the doughnut series is Stacked. This is a bindable property.
Declaration
public static readonly BindableProperty IsStackedDoughnutProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
MaximumValueProperty
The maximum value property.This is a bindable property.
Declaration
public static readonly BindableProperty MaximumValueProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
SpacingProperty
Gets or sets the value that resides between 0 to 1, handles the gap radius between the doughnut segment. This is a bindable property.
Declaration
public static readonly BindableProperty SpacingProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TrackBorderColorProperty
Gets or sets the value to select the Track border color property. This is a bindable property.
Declaration
public static readonly BindableProperty TrackBorderColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TrackBorderWidthProperty
Gets or sets the value to select the Track border width property. This is a bindable property.
Declaration
public static readonly BindableProperty TrackBorderWidthProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TrackColorProperty
Gets or sets the value to select the Track color property. This is a bindable property.
Declaration
public static readonly BindableProperty TrackColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
CapStyle
Gets or sets the cap style. cap style contains both curve, both flat, start curve and end curve.
Declaration
public DoughnutCapStyle CapStyle { get; set; }
Property Value
Type | Description |
---|---|
DoughnutCapStyle | The cap style. |
CenterView
Gets or sets the view to be added to the center of the doughnut series.
Declaration
public View CenterView { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.View | The center view. |
DoughnutCoefficient
Gets or sets the value that resides between 0 to 1, handles the inner radius of the doughnut series. This is a bindable property.
Declaration
public double DoughnutCoefficient { get; set; }
Property Value
Type | Description |
---|---|
System.Double | This property takes the double value. |
InnerRadius
Gets the inner radius of the doughnut series that can be used to provide center view for the series.
Declaration
public float InnerRadius { get; }
Property Value
Type | Description |
---|---|
System.Single | The inner radius. |
IsStackedDoughnut
Gets or sets a value indicating whether this DoughnutSeries is stacked doughnut.
Declaration
public bool IsStackedDoughnut { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MaximumValue
Gets or sets the maximum value.
Declaration
public double MaximumValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The maximum value. |
Spacing
Gets or sets the value that resides between 0 to 1, handles the gap between the segment of the doughnut series. This is a bindable property.
Declaration
public double Spacing { get; set; }
Property Value
Type | Description |
---|---|
System.Double | This property takes the double value. |
TrackBorderColor
Gets or sets the color of the track border to customize the appearance of stacked doughnut series. This is a bindable property.
Declaration
public Color TrackBorderColor { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | The color of the track border. |
TrackBorderWidth
Gets or sets the width of the track border.
Declaration
public double TrackBorderWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of the track border. |
TrackColor
Gets or sets the track area color to customize the appearance of stacked doughnut series. This is a bindable property.
Declaration
public Color TrackColor { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | The color of the track. |