Articles in this section
Category / Section

How to customize the axis label format based on the culture in Xamarin.Forms Chart (SfChart)?

3 mins read

Xamarin SfChart allows you to the change axis label format, based on any culture like Dutch, French etc. ChartAxis provides the LabelCreated event for formatting the axis labels.

 

The following code illustrates how to use the LabelCreated event.

 

C#

chart.SecondaryAxis.LabelCreated += (object sender, ChartAxisLabelEventArgs e) =>
{
      double labelContent = Convert.ToDouble(e.LabelContent);
      e.LabelContent = labelContent.ToString("C", new CultureInfo("de-DE"));
};

Output

Setting axis label format based on culture.

Conclusion

I hope you enjoyed learning about how to customize the axis label format based on the culture in Xamarin.Forms Chart (SfChart).

You can refer to our Xamarin Chart’s feature tour page to know about its other groundbreaking feature representations. You can also explore our Xamarin Chart Documentation to understand how to present and manipulate data.

For current customers, you can check out our Xamarin components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our Xamarin Chart and other Xamarin components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac or feedback portal. We are always happy to assist you!

 

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