You can categorize the axis values using the Start
and End
properties in the LinearGaugeRange
. You can add any number of ranges for an axis using array of range objects.
@using Syncfusion.EJ2.Blazor.LinearGauge
<EjsLinearGauge>
<LinearGaugeAxes>
<LinearGaugeAxis>
<LinearGaugeRanges>
<LinearGaugeRange Start="50" End="80">
</LinearGaugeRange>
</LinearGaugeRanges>
</LinearGaugeAxis>
</LinearGaugeAxes>
</EjsLinearGauge>
Ranges can be customized using the following properties.
StartWidth
- Specifies start width of the rangeEndWidth
- Specifies end width of the rangeColor
- Specifies color of the rangePosition
- Specifies the range bar position. Its possible values are ‘Position.Inside’ and ‘Position.Outside’Offset
- Specifies offset value from its default positionLinearGaugeRangeBorder
- Specifies range bar border color and width.@using Syncfusion.EJ2.Blazor.LinearGauge
<EjsLinearGauge>
<LinearGaugeAxes>
<LinearGaugeAxis>
<LinearGaugeRanges>
<LinearGaugeRange Start="50"
End="80"
StartWidth="2"
EndWidth="15"
Color="orange"
Position="Position.Inside"
Offset="4">
<LinearGaugeRangeBorder Color="red" Width="2"></LinearGaugeRangeBorder>
</LinearGaugeRange>
</LinearGaugeRanges>
</LinearGaugeAxis>
</LinearGaugeAxes>
</EjsLinearGauge>
You can add multiple ranges to an axis as demonstrated in the following code sample.
@using Syncfusion.EJ2.Blazor.LinearGauge
<EjsLinearGauge>
<LinearGaugeAxes>
<LinearGaugeAxis>
<LinearGaugeRanges>
<LinearGaugeRange Start="1"
End="30"
StartWidth="10"
EndWidth="10"
Color="#41f47f">
</LinearGaugeRange>
<LinearGaugeRange Start="30"
End="50"
StartWidth="10"
EndWidth="10"
Color="#f49441">
</LinearGaugeRange>
<LinearGaugeRange Start="50"
End="80"
StartWidth="10"
EndWidth="10"
Color="#cd41f4">
</LinearGaugeRange>
</LinearGaugeRanges>
</LinearGaugeAxis>
</LinearGaugeAxes>
</EjsLinearGauge>