How to format X axis labels in datetime format?

A forum dedicated to LightningChart Basic.

Moderator: Arction_LasseP

Locked
SupportArchives
Posts: 16
Joined: Tue Mar 26, 2013 11:01 pm

How to format X axis labels in datetime format?

Post by SupportArchives » Tue Mar 26, 2013 11:06 pm

How do I get the X axis labels rendering in format like 2/5/2012 12:15:34.5543?
:)

User avatar
ArctionPasi
Posts: 1362
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: How to format X axis labels in datetime format?

Post by ArctionPasi » Wed Mar 27, 2013 3:09 pm

Set

Code: Select all

XAxis.AutoFormatLabels = false; 
XAxis.LabelsTimeFormat =”dd/MM/yyyy HH:mm:ss.ff”;
Set all data points X values and X axis ranges in seconds.

Code: Select all

double X = TimeSpan.FromTicks(new DateTime(2013, 3, 27, 05, 02, 10).Ticks).TotalSeconds;
The second decimals are limited to 2. In LightningChart Ultimate, it’s not limited.
LightningChart Support Team, PT

Locked