How to customize the range shape in the .NET MAUI Linear Gauge (SfLinearGauge)?
The Syncfusion® .NET MAUI Linear Gauge (SfLinearGauge) enables customization of the range shape. This guide demonstrates how to customize the range shape using the SfLinearGauge.
XAML:
The Linear Gauge range is defined by two values - StartValue and EndValue. These values show where the range appears on the axis. In addition to these numbers, the range’s form can be customized using the StartWidth, MidWidth, and EndWidth properties. To create a line or rectangle, specify the StartValue, StartWidth, EndValue and EndWidth. The MidWidth property is essential for creating concave or convex shapes.
<gauge:SfLinearGauge VerticalOptions="Center" WidthRequest="600">
<gauge:SfLinearGauge.Ranges>
<gauge:LinearRange StartWidth="20"
MidWidth="30"
EndWidth="90"
Fill="CadetBlue"/>
</gauge:SfLinearGauge.Ranges>
</gauge:SfLinearGauge>
Output:
Conclusion:
I hope you enjoyed learning how to customize the range shape in the .NET MAUI Linear Gauge (SfLinearGauge).
Refer to our .NET MAUI Linear Gauge feature tour page to learn about its other groundbreaking feature representations. You can also explore our .NET MAUI Linear Gauge documentation to understand how to present and manipulate data.
For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to check out our .NET MAUI LinearGauge and other .NET MAUI components.
Please let us know in the comment section if you have any queries or require clarification. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!