Page 1 of 1
X Axis labels
Posted: Tue Feb 27, 2007 1:26 pm
by 8443014
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
Posted: Wed Feb 28, 2007 9:27 am
by yeray
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
Posted: Wed Feb 28, 2007 9:26 pm
by 9232632
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).