Page 1 of 1

TSurfaceSeries, BottomAxis DateTime label problem

Posted: Tue Mar 28, 2006 8:04 pm
by 9236851
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

Posted: Wed Mar 29, 2006 8:02 am
by narcis
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;
}

Posted: Thu Mar 30, 2006 8:58 am
by 9236851
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