We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

date Format DateTimeAxis

Thread ID:





131901 Aug 2,2017 06:58 AM Aug 3,2017 06:53 PM Xamarin.Forms 3
Tags: SfChart
David Perera
Asked On August 2, 2017 06:58 AM

I cannot see a way to format the date in the DateTimeAxis.

Something like what we have in the SfDateTimeRangeNavigator e.g. SfDateTimeRangeNavigator.TooltipFormat = "dd/MM/yyyy";

Where is it?


Saravana Pandian Murugan [Syncfusion]
Replied On August 3, 2017 01:21 AM

Hi David, 
Thanks for using Syncfusion products. 
You can achieve this requirement by using LabelFormat property of ChartAxisLabelStyle. Please find the below code snippet below. 
Code Example:  
             <chart:ChartAxisLabelStyle LabelFormat ="dd/MMM"/>  
DateTimeAxis dateTimeAxis = new DateTimeAxis(); 
dateTimeAxis.LabelStyle.LabelFormat = "dd/MMM"; 
chart.PrimaryAxis = dateTimeAxis; 
We have prepared sample as per your requirement which can be downloaded from the following location. 
Please check the attached sample and let us know if you need further assistance on this. 
Saravana Pandian M. 

David Perera
Replied On August 3, 2017 03:35 AM

That works perfect. Thanks!

Saravana Pandian Murugan [Syncfusion]
Replied On August 3, 2017 06:53 PM

Hi David,

Thanks for the update. We are glad to know that the given solution worked. Please get back to us if you need further assistance.

Saravana Pandian M.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.