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.
Syncfusion Feedback

SFDateTimeAxis Change Label Format

Thread ID:

Created:

Updated:

Platform:

Replies:

132740 Sep 19,2017 05:59 AM UTC Sep 20,2017 10:56 AM UTC Xamarin.Forms 1
loading
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.  
   
Xamarin.Forms:  
   
   
     <chart:DateTimeAxis>   
   
        <chart:DateTimeAxis.LabelStyle>   
   
            <chart:ChartAxisLabelStyle LabelFormat="hh:mm:ss"></chart:ChartAxisLabelStyle>   
   
        </chart:DateTimeAxis.LabelStyle>   
   
     </chart:DateTimeAxis>   
   
  
Xamarin.iOS:   
    
   
SFDateTimeAxis dateTimeAxis = new SFDateTimeAxis();   
    
dateTimeAxis.LabelStyle.LabelFormatter = new NSDateFormatter() {DateFormat="hh:mm:ss"};   
  
   
Xamarin.Android:   
 
   
DateTimeAxis dateTimeAxis = new DateTimeAxis(); 
 
dateTimeAxis.LabelStyle.LabelFormat = "hh:mm:ss"; 
  
   
Please let us know, if you need further assistance on this.   
   
Regards,   
Parthiban S  


CONFIRMATION

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.

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

;