TSurfaceSeries, BottomAxis DateTime label problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Wiebe
Newbie
Newbie
Posts: 21
Joined: Wed May 11, 2005 4:00 am
Location: Middelburg
Contact:

TSurfaceSeries, BottomAxis DateTime label problem

Post by Wiebe » Tue Mar 28, 2006 8:04 pm

BCB6 and TeeChart Pro v7.05

I have a TChart in 3D mode with a TSurfaceSeries.
The BottomAxis is in DataTime format.
I cannot get the date labels displayed only at the positions according
the X(date) values added with the AddXYZ() function.
Instead the position (and contents) of the labels follow a scaling pattern.
How to accomplish what I want?

Thanks in advance,
Wiebe

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

Post by Narcís » Wed Mar 29, 2006 8:02 am

Hi Wiebe,

It works fine for me here using the code below. If necessary you can also uncomment the LabelsSeparation line.

Code: Select all

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  for (int i=0;i<20;++i)
    for (int j=0;j<20;++j)
      Series1->AddXYZ(Now()+i,random(100),j);

  Series1->XValues->DateTime=true;
  Series1->IrregularGrid=true;
  Chart1->Axes->Bottom->LabelStyle=talValue;
  Chart1->Axes->Bottom->LabelsAngle=90;
  //Chart1->Axes->Bottom->LabelsSeparation=0;
}
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

Wiebe
Newbie
Newbie
Posts: 21
Joined: Wed May 11, 2005 4:00 am
Location: Middelburg
Contact:

Post by Wiebe » Thu Mar 30, 2006 8:58 am

Thanks Narcis,

I did not make myself quite clear as to what to accomplish, however I succeeded in doing the following:
//------------
date = ... // preparing date
Series1->AddXYZ ( (float)i, yValue, zValue, date.DateString(),
clTeeColor );
//---------------

Wiebe

Post Reply