Class RadialBarSeries
The RadialBarSeries displays data in different categories. Its typically used to make comparisons among a set of given data using the circular shapes of the bars.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class RadialBarSeries : CircularSeries, IDatapointSelectionDependent, ITooltipDependent, IDataTemplateDependent, IDrawCustomLegendIcon
Remarks
It is similar to the DoughnutSeries. To render a series, create an instance of the radial bar series class, and add it to the Series collection.
It provides options for TrackFill, TrackStroke, TrackStrokeWidth, MaximumValue, GapRatio, CapStyle, CenterView, PaletteBrushes, Fill, Stroke, StrokeWidth, and InnerRadius to customize the appearance.
Examples
<chart:SfCircularChart>
<chart:SfCircularChart.Series>
<chart:RadialBarSeries
ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
TrackFill="Red"
TrackStroke="Green"
TrackStrokeWidth="1"/>
</chart:SfCircularChart.Series>
</chart:SfCircularChart>
Constructors
RadialBarSeries()
Initializes a new instance of the RadialBarSeries class.
Declaration
public RadialBarSeries()
Fields
CapStyleProperty
Identifies the CapStyle bindable property.
Declaration
public static readonly BindableProperty CapStyleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
CenterViewProperty
Identifies the CenterView bindable property.
Declaration
public static readonly BindableProperty CenterViewProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
GapRatioProperty
Identifies the GapRatio bindable property.
Declaration
public static readonly BindableProperty GapRatioProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
InnerRadiusProperty
Identifies the InnerRadius bindable property.
Declaration
public static readonly BindableProperty InnerRadiusProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
MaximumValueProperty
Identifies the MaximumValue bindable property.
Declaration
public static readonly BindableProperty MaximumValueProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TrackFillProperty
Identifies the TrackFill bindable property.
Declaration
public static readonly BindableProperty TrackFillProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TrackStrokeProperty
Identifies the TrackStroke bindable property.
Declaration
public static readonly BindableProperty TrackStrokeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TrackStrokeWidthProperty
Identifies the TrackStrokeWidth bindable property.
Declaration
public static readonly BindableProperty TrackStrokeWidthProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
CapStyle
Gets or sets the CapStyle value, that represents the shape of the start and end points of a radial segment.
Declaration
public CapStyle CapStyle { get; set; }
Property Value
Type | Description |
---|---|
CapStyle |
Examples
<chart:SfCircularChart>
<chart:SfCircularChart.BindingContext>
<local:ViewModel/>
</chart:SfCircularChart.BindingContext>
<chart:RadialBarSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
CapStyle = "BothCurve" />
</chart:SfCircularChart>
CenterHoleSize
Gets the size of the radial bar center hole.
Declaration
public double CenterHoleSize { get; }
Property Value
Type |
---|
System.Double |
CenterView
Gets or sets the view that added to the center of the radial bar.
Declaration
public View CenterView { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.View | It accepts any Microsoft.Maui.Controls.View object, and its default value is null. |
Examples
<chart:SfCircularChart>
<chart:SfCircularChart.BindingContext>
<local:ViewModel/>
</chart:SfCircularChart.BindingContext>
<chart:SfCircularChart.Series>
<chart:RadialBarSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"/>
<chart:RadialBarSeries.CenterView>
<Label Text="CenterView"/>
</chart:RadialBarSeries.CenterView>
</chart:SfCircularChart.Series>
</chart:SfCircularChart>
GapRatio
Gets or sets the gap ratio, which indicates the distance between two individual segments.
Declaration
public double GapRatio { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values, and its default value is 0.2d. |
Remarks
The value ranges between 0 and 1.
Examples
<chart:SfCircularChart>
<chart:SfCircularChart.BindingContext>
<local:ViewModel/>
</chart:SfCircularChart.BindingContext>
<chart:RadialBarSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
GapRatio = "0.3" />
</chart:SfCircularChart>
InnerRadius
Gets or sets a value that determines the size of the inner circle.
Declaration
public double InnerRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values, and the default value is 0.4. |
Remarks
The value ranges between 0 and 1.
Examples
<chart:SfCircularChart>
<chart:SfCircularChart.BindingContext>
<local:ViewModel/>
</chart:SfCircularChart.BindingContext>
<chart:RadialBarSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
InnerRadius = "0.2" />
</chart:SfCircularChart>
MaximumValue
Gets or sets the maximum value for the radial bar segments.
Declaration
public double MaximumValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and its default value is System.Double.NaN |
Examples
<chart:SfCircularChart>
<chart:SfCircularChart.BindingContext>
<local:ViewModel/>
</chart:SfCircularChart.BindingContext>
<chart:RadialBarSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
MaximumValue="100"/>
</chart:SfCircularChart>
TrackFill
Gets or sets the brush value that represents the fill color of the track in a radial bar chart.
Declaration
public Brush TrackFill { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | It accepts Microsoft.Maui.Controls.Brush values and its default value is null. |
Examples
<chart:SfCircularChart>
<chart:SfCircularChart.BindingContext>
<local:ViewModel/>
</chart:SfCircularChart.BindingContext>
<chart:RadialBarSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
TrackFill="Red"/>
</chart:SfCircularChart>
TrackStroke
Gets or sets the brush value that represents the stroke color of the track in a radial bar chart.
Declaration
public Brush TrackStroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | It accepts Microsoft.Maui.Controls.Brush values and its default value is null. |
Examples
<chart:SfCircularChart>
<chart:SfCircularChart.BindingContext>
<local:ViewModel/>
</chart:SfCircularChart.BindingContext>
<chart:RadialBarSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
TrackStroke="Red"
TrackStrokeWidth="1"/>
</chart:SfCircularChart>
TrackStrokeWidth
Gets or sets the brush value that represents the stroke thickness of the track in a radial bar chart.
Declaration
public double TrackStrokeWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and its default value is 1. |
Remarks
The value needs to be greater than zero.
Examples
<chart:SfCircularChart>
<chart:SfCircularChart.BindingContext>
<local:ViewModel/>
</chart:SfCircularChart.BindingContext>
<chart:RadialBarSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
TrackStroke="Red"
TrackStrokeWidth="1"/>
</chart:SfCircularChart>
Methods
CreateSegment()
Declaration
protected override ChartSegment CreateSegment()
Returns
Type |
---|
ChartSegment |
Overrides
OnBindingContextChanged()
Declaration
protected override void OnBindingContextChanged()