How to customize the bar pointer in the .NET MAUI Linear Gauge (SfLinearGauge)?
The Syncfusion® .NET MAUI Linear Gauge (SfLinearGauge) allows you to customize the Bar Pointer. The following demonstration helps you understand how to customize the Bar Pointer using its properties.
A bar pointer is a highlighting line or shaded backdrop that can denote any current value in the scale track on a Linear Gauge. The bar pointers always begin at the minimum value of the scale and end at the specified value. As a result, the Value property is necessary when establishing a bar pointer.
Customization of a Bar Pointer can be handled with the help of the following mentioned properties.
- PointerSize - The thickness of the Bar Pointer can be changed.
- Position - Allows changing the position of the Bar Pointer. The bar pointer can be placed Inside, Cross, or Outside the scale.
- Offset - Helps to customize the distance of the Bar Pointer from the scale and it does not affect cross-positioned elements.
- Fill - The color of the Bar Pointer can be changed using this property.
- CornerStyle - Helps to change the edge style of the bar pointer. The StartCurve, EndCurve, BothCurve, and BothFlat options are available to set the edge style.
<gauge:SfLinearGauge VerticalOptions="Center" WidthRequest="600">
<gauge:SfLinearGauge.BarPointers>
<gauge:BarPointer Value="40"
PointerSize="8"
CornerStyle="EndCurve"
Position="Inside"
Offset="5"
Fill="DarkBlue"/>
</gauge:SfLinearGauge.BarPointers>
</gauge:SfLinearGauge>
- The default value of the Position property is Cross.
- The default value of the CornerStyle property is BothFlat.
Output:
Conclusion
I hope you enjoyed learning how to customize the Bar Pointer 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!