How to customize the scale labels using lable style in the .NET MAUI Linear Gauge (SfLinearGauge)?
The Syncfusion® .NET MAUI Linear Gauge (SfLinearGauge) supports customizing the scale labels. This article demonstrates how to customize the scale labels using the LabelStyle 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 LabelStyle property in the .NET MAUI Linear Gauge (SfLinearGauge).
Refer to our .NET MAUI Linear Gauge feature tour page for 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 Linear Gauge and other .NET MAUI components.
Please let us know in the following 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!