Class RadialRange
Create the range to add color bar in the gauge. RadialRange is a visual that helps to quickly visualize where a value falls on the axis.
Inheritance
Namespace: Syncfusion.Maui.Gauges
Assembly: Syncfusion.Maui.Gauges.dll
Syntax
public class RadialRange : Element, IThemeElement
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="0" EndValue="35" Fill="Red" />
<gauge:RadialRange StartValue="35" EndValue="75" Fill="Yellow"/>
<gauge:RadialRange StartValue="75" EndValue="100" Fill="Green"/>
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Constructors
RadialRange()
Initializes a new instance of the RadialRange class.
Declaration
public RadialRange()
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="50" EndValue="100" />
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Fields
EndValueProperty
Identifies the EndValue bindable property.
Declaration
public static readonly BindableProperty EndValueProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for EndValue bindable property. |
EndWidthProperty
Identifies the EndWidth bindable property.
Declaration
public static readonly BindableProperty EndWidthProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for EndWidth bindable property. |
FillProperty
Identifies the Fill bindable property.
Declaration
public static readonly BindableProperty FillProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Fill bindable property. |
GradientStopsProperty
Identifies the GradientStops bindable property.
Declaration
public static readonly BindableProperty GradientStopsProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for GradientStops bindable property. |
LabelProperty
Identifies the Label bindable property.
Declaration
public static readonly BindableProperty LabelProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Label bindable property. |
LabelStyleProperty
Identifies the LabelStyle bindable property.
Declaration
public static readonly BindableProperty LabelStyleProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for LabelStyle bindable property. |
OffsetUnitProperty
Identifies the OffsetUnit bindable property.
Declaration
public static readonly BindableProperty OffsetUnitProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for OffsetUnit bindable property. |
RangeOffsetProperty
Identifies the RangeOffset bindable property.
Declaration
public static readonly BindableProperty RangeOffsetProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for RangeOffset bindable property. |
StartValueProperty
Identifies the StartValue bindable property.
Declaration
public static readonly BindableProperty StartValueProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for StartValue bindable property. |
StartWidthProperty
Identifies the StartWidth bindable property.
Declaration
public static readonly BindableProperty StartWidthProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for StartWidth bindable property. |
WidthUnitProperty
Identifies the WidthUnit bindable property.
Declaration
public static readonly BindableProperty WidthUnitProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for WidthUnit bindable property. |
Properties
EndValue
Gets or sets the value that specifies the range end value.
Declaration
public double EndValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It defines the end value of the range. The default value is |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange EndValue="100" />
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
EndWidth
Gets or sets the value that specifies the range end width. You can specify value either in logical pixel or radius factor using the WidthUnit property.
Declaration
public double EndWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It defines the end width of the range. The default value is |
Examples
If WidthUnit is Factor, value must be given from 0 to 1. Here range start width is calculated by EndWidth * axis radius value. Example: EndWidth value is 0.2 and axis radius is 100, range start width is 20(0.2 * 100) logical pixels. if WidthUnit is Pixel, the defined value is set for the end width of the range.
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="50"
EndValue="100"
RangeOffset="10"
OffsetUnit="Factor"
StartWidth="10"/>
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Fill
Gets or sets the Color that paints the interior area of the range.
Declaration
public Brush Fill { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | A |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="70"
EndValue="100"
Fill="Red" />
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
GradientStops
Gets or sets a collection of GaugeGradientStop to fill the gradient brush to the gauge range.
Declaration
public ObservableCollection<GaugeGradientStop> GradientStops { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<GaugeGradientStop> | A collection of the GaugeGradientStop objects associated with the brush, each of which specifies a color and an offset along the axis. The default is an empty collection. |
Examples
The below examples shows, how to add a collection of gradient stop to the gauge range.
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="0"
EndValue="100">
<gauge:RadialRange.GradientStops>
<gauge:GaugeGradientStop Value="0"
Color="Green" />
<gauge:GaugeGradientStop Value= "50"
Color="Yellow" />
<gauge:GaugeGradientStop Value="100"
Color="Red" />
</gauge:RadialRange.GradientStops>
</gauge:RadialRange>
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Label
Gets or sets the value that specifies the text for range.
Declaration
public string Label { get; set; }
Property Value
Type | Description |
---|---|
System.String | It defines the string for the range label. The default value is |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis ShowTicks="False"
ShowLabels="False">
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="0"
EndValue="30"
StartWidth="0.5"
EndWidth="0.5"
WidthUnit="Factor"
Fill="Red"
Label="Slow" />
<gauge:RadialRange StartValue="30"
EndValue="70"
StartWidth="0.5"
EndWidth="0.5"
WidthUnit="Factor"
Fill="Yellow"
Label="Moderate" />
<gauge:RadialRange StartValue="70"
EndValue="100"
StartWidth="0.5"
EndWidth="0.5"
WidthUnit="Factor"
Fill="Green"
Label="Fast" />
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
LabelStyle
Gets or sets GaugeLabelStyle, that helps to customize label in range.
Declaration
public GaugeLabelStyle LabelStyle { get; set; }
Property Value
Type |
---|
GaugeLabelStyle |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue = "70" EndValue="100" Label="Syncfusion">
<gauge:RadialRange.LabelStyle>
<gauge:GaugeLabelStyle TextColor="Red" />
</gauge:RadialRange.LabelStyle>
</gauge:RadialRange>
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
OffsetUnit
Gets or sets the value that indicates the to calculate the range offset either in logical pixel or factor.
Declaration
public SizeUnit OffsetUnit { get; set; }
Property Value
Type | Description |
---|---|
SizeUnit | One of the SizeUnit enumeration that specifies how the RangeOffset value is considered. The default mode is Pixel. |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="50" EndValue="100"
RangeOffset="10" OffsetUnit="Factor" />
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
RangeOffset
Gets or sets the value that specifies the range position. You can specify value either in logical pixel or radius factor using the OffsetUnit property.
Declaration
public double RangeOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It defines offset of the range either in pixel or factor. The default value is |
Examples
If WidthUnit is Factor, value will be given from 0 to 1. Here range placing position is calculated by RangeOffset * axis radius value. Example: RangeOffset value is 0.2 and axis radius is 100, range is moving 20(0.2 * 100) logical pixels from axis outer radius. If WidthUnit is Pixel, the given value distance range moves from the outer radius axis. When you specify RangeOffset is negative, the range will be positioned outside the axis.
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="50" EndValue="100" RangeOffset="10" />
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
StartValue
Gets or sets the value that specifies the range start value.
Declaration
public double StartValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It defines the start value of the range. The default value is |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="50" />
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
StartWidth
Gets or sets the value that specifies the range start width. You can specify value either in logical pixel or radius factor using the WidthUnit property.
Declaration
public double StartWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It defines the start width of the range. The default value is |
Examples
If WidthUnit is Factor, value must be given from 0 to 1. Here range start width is calculated by StartWidth * axis radius value. Example: StartWidth value is 0.2 and axis radius is 100, range start width is 20(0.2 * 100) logical pixels. if WidthUnit is Pixel, the defined value is set for the start width of the range.
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="50"
EndValue="100"
RangeOffset="10"
OffsetUnit="Factor"
StartWidth="10"/>
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
WidthUnit
Gets or sets the value that indicates the whether range start and end width can be calculated using logical pixel or radius factor.
Declaration
public SizeUnit WidthUnit { get; set; }
Property Value
Type | Description |
---|---|
SizeUnit | One of the SizeUnit enumeration that specifies how the StartWidth and EndWidth values are considered. The default mode is Pixel. |
Examples
<gauge:SfRadialGauge>
<gauge:SfRadialGauge.Axes>
<gauge:RadialAxis>
<gauge:RadialAxis.Ranges>
<gauge:RadialRange StartValue="50" EndValue="100" RangeOffset="10"
OffsetUnit="Factor" SizeUnit="Factor" />
</gauge:RadialAxis.Ranges>
</gauge:RadialAxis>
</gauge:SfRadialGauge.Axes>
</gauge:SfRadialGauge>
Methods
OnBindingContextChanged()
Invoked whenever the binding context of the View changes.
Declaration
protected override void OnBindingContextChanged()