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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SFDateTimeAxis Change Label Format

Thread ID:





132740 Sep 19,2017 05:59 AM UTC Sep 20,2017 10:56 AM UTC Xamarin.Forms 1
Tags: SfChart
Zhen Liu
Asked On September 19, 2017 05:59 AM UTC

The label on SFDateTimeAxis is only displaying the dates, but my data only covers two hours in timespan. How can I change the label to display times (e.g. hh:mm:ss)?

Parthiban Sundaram [Syncfusion]
Replied On September 20, 2017 10:56 AM UTC

Hi Zhen,   
Thanks for using Syncfusion products.  
You can change the format of the date time axis labels using following code snippets.  
            <chart:ChartAxisLabelStyle LabelFormat="hh:mm:ss"></chart:ChartAxisLabelStyle>   
SFDateTimeAxis dateTimeAxis = new SFDateTimeAxis();   
dateTimeAxis.LabelStyle.LabelFormatter = new NSDateFormatter() {DateFormat="hh:mm:ss"};   
DateTimeAxis dateTimeAxis = new DateTimeAxis(); 
dateTimeAxis.LabelStyle.LabelFormat = "hh:mm:ss"; 
Please let us know, if you need further assistance on this.   
Parthiban S  


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon