Time on X axis omitting hour value

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
jorge
Posts: 20
Joined: Tue Jun 28, 2016 7:54 am

Time on X axis omitting hour value

Post by jorge » Thu Jun 30, 2016 2:50 pm

Hi,

I have a graph with X axis representing time. When I start adding values, they all are in the same minute range, so it seems the hour is not displayed in the axis labels. I only can see minutes (all set to 00) and seconds (eg: "00:25).
It is only when I start adding values that are not in the same minute that the full time is displayed in the axis labels so I get hour, minute and seconds in the X axis.
Is there a way to enforce the time in the X axis to be always in the format HH:mm:ss ?

I am setting the axis properties like this:

Code: Select all

axisX.Title.Visible = false;
axisX.ValueType = AxisValueType.Time;
axisX.LabelsTimeFormat = "HH:mm:ss";

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

Re: Time on X axis omitting hour value

Post by ArctionPasi » Thu Jun 30, 2016 2:58 pm

Hello :)

You must disable automatic formatting

Code: Select all

axisX.AutoFormatLabels = false 
Then your manual format will apply.

Note you can also format the axis labels with axisX.FormatValueLabel event handler.
LightningChart Support Team, PT

jorge
Posts: 20
Joined: Tue Jun 28, 2016 7:54 am

Re: Time on X axis omitting hour value

Post by jorge » Fri Jul 01, 2016 7:44 am

Thanks Pasi, it worked.

Post Reply