Articles in this section
Category / Section

How to format the trackball labels?

1 min read

SfChart allows you to customize format of the trackball labels using the LabelFormat property in ChartTrackballLabelStyle.

C#

ChartTrackballBehavior behavior = new ChartTrackballBehavior();
behavior.LabelStyle = new ChartTrackballLabelStyle();
behavior.LabelStyle.LabelFormat = "0.00";

 

XAML

<chart:ChartTrackballBehavior x:Name="chartTrackball">
    <chart:ChartTrackballBehavior.LabelStyle>
        <chart:ChartTrackballLabelStyle LabelFormat ="0.00" />
    </chart:ChartTrackballBehavior.LabelStyle>
</chart:ChartTrackballBehavior>

 

Output:

 

Formatted trackball for Chart in Xamarin.Forms

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments
Please sign in to leave a comment
Access denied
Access denied