Page 1 of 1

DateTime axis labels

Posted: Tue Jul 11, 2006 12:57 pm
by 9336351
When I add date-time series data to a chart, the axes are labelled as date/times exactly as they should be.

But if I happen to rebuild the chart at run-time with no series, the chart axis doesn't know that it's supposed to be a date-time axis, and reverts to labelling itself with plain numerics. This destroys the neat formatting of my array of charts.

How can I tell the axis to draw itself as a date-time axis even when it plots no series?

Posted: Tue Jul 11, 2006 1:03 pm
by narcis
Hi toreba,

You can use:

Code: Select all

  Series1.XValues.DateTime := True;
  Chart1.Axes.Bottom.DateTimeFormat := 'mm/dd hh:mm';