How to customize the scale labels using lable style in the .NET MAUI Linear Gauge (SfLinearGauge)?
Syncfusion .NET MAUI Linear Gauge (SfLinaearGauge) supports customizing the scale labels. In this article, you will understand how to customize the scale labels using the LableStyle property.
XAML:
The LabelStyle property of the SfLinearGauge can be used to customize scale labels. To customize the scale labels, the LabelStyle property provides the following properties.
- FontFamily - This property specifies the font family for labels.
- FontAttributes - This property allows you to set the font weight for labels.
- FontSize - This property specifies the font size for labels.
- TextColor - This property allows you to change the color of the labels.
<gauge:SfLinearGauge VerticalOptions="Center" WidthRequest="500">
<gauge:SfLinearGauge.LabelStyle>
<gauge:GaugeLabelStyle FontAttributes="Bold" FontSize="15" TextColor="CadetBlue"/>
</gauge:SfLinearGauge.LabelStyle>
</gauge:SfLinearGauge>
Output:
Conclusion
I hope you enjoyed learning how to customize the scale labels using the LableStyle property in the .NET MAUI Linear Gauge (SfLinearGauge).
Refer to our .NET MAUI LinearGauge’s feature tour page for other groundbreaking feature representations. You can also explore our .NET MAUI LinearGauge 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 following comment section if you have any queries or require clarifications. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!