DateTime axis labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
toreba
Newbie
Newbie
Posts: 7
Joined: Thu Mar 11, 2004 5:00 am
Location: UK
Contact:

DateTime axis labels

Post by toreba » Tue Jul 11, 2006 12:57 pm

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?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jul 11, 2006 1:03 pm

Hi toreba,

You can use:

Code: Select all

  Series1.XValues.DateTime := True;
  Chart1.Axes.Bottom.DateTimeFormat := 'mm/dd hh:mm';
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply