X Axis labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

X Axis labels

Post by Thomas Klingler » Tue Feb 27, 2007 1:26 pm

using Borland C++ Builder 6.0. have a TChart object and using it as a series. on the X-Axis, we have date values which on the initial display of the data, display across several days (ok, so far). when we select a segment of the data (zoom), and keep zooming until we are looking at about 1 days worth of data, the tick marks have no values. is it possible to have these show an appropriate time value (more as the zoom level gets finer)?

tried setting the data/time format in the Chart/Axis/Bottom Axis parameters to M/d/yyyy h:mm (or h:nn). this works when the display comes up (h:m are set to 0:00), but when zooming, the h:m values disappear).

TYIA

Pete Turner

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Feb 28, 2007 9:27 am

Hi Pete,
We ran the following code without being able to reproduce your problem:

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  Chart1->View3D = False;

  for (int i = 0; i < 500; i++)
    Series1->AddXY(Now()+(0.01*i),random(100),"",clRed);

  Series1->XValues->DateTime = True;
}

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Chart1->Axes->Bottom->DateTimeFormat = "M/d/yyyy h:mm";
}
In the default bottom axis displaying datetime values we can zoom as we want untill see a one minute increment. (00:00 ... 00:01 ...)
And similar after pressing button1 (01/03/2007 00:00 ... 01/03/2007 00:01 ...).

Note that in this project we only added a fastline series i design-time.

If this doesn't help, could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

rperkins
Newbie
Newbie
Posts: 58
Joined: Wed May 26, 2004 4:00 am

Post by rperkins » Wed Feb 28, 2007 9:26 pm

added setting the format using the referenced code snippet after setting Min/Max in our functions, AND setting the desired "granularity" to 15 Minutes. doing this, resulted in the tick marks showing values down to 15 minute increments when zooming way in.

THANKS for the support.

Pete Turner
(note: using new login id).

Post Reply