Something like Chart1[n].XValues.DateTime for ZValues?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Jan
Newbie
Newbie
Posts: 24
Joined: Fri Nov 15, 2002 12:00 am
Location: Germany

Something like Chart1[n].XValues.DateTime for ZValues?

Post by Jan » Wed Nov 24, 2004 3:31 pm

I'm sure you have been asked several times, but i can't find the answer at the moment. I would like to use a timescale on different axis in a 3D TPoint3DSeries. This has do be done by code at runtime. Im am using the following code for the x-Values:

SeriesCounter := Chart1.SeriesCount; // get series No. before
CHart1.AddSeries (TPoint3DSeries); // generating the new series

With (Chart1.Series[SeriesCounter] as TPoint3DSeries) do // so we dont have to sub one
Begin
Clear;
VertAxis := aLeftAxis;
HorizAxis := aBottomAxis;
Zorder := 0;
ColMin := Infinity;
ColMax := NegInfinity;
Visible := frm3dSurface.cb3dPlotVisible.Checked;
LinePen.Visible := frm3dSurface.cb3dPlotLinePoints.Checked;
Title := frm3dSurface.ed3dSurfScatterName.Text;

If frm3DSurface.cob3dXFormat.ItemIndex <> 0 THen Chart1[Chart1.SeriesCount-1].XValues.DateTime := True
Else Chart1[Chart1.SeriesCount-1].XValues.DateTime := False;

// If frm3DSurface.cob3dZFormat.ItemIndex <> 0 THen Chart1[Chart1.SeriesCount-1].ZValues.DateTime := True
// Else Chart1[Chart1.SeriesCount-1].ZValue.DateTime := False;

If frm3DSurface.cob3dYFormat.ItemIndex <> 0 THen Chart1[Chart1.SeriesCount-1].YValues.DateTime := True
Else Chart1[Chart1.SeriesCount-1].YValues.DateTime := False;

What can i write for the two lines, where i try to set the format for the ZValues? I don't know what to use... Or any other ideas how to improve this code?

Thanks, Jan

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Nov 25, 2004 2:34 pm

Hi Jan,

how about using :
(Chart1[0] as TPoint3DSeries).ZValues.DateTime := true;
?

Jan
Newbie
Newbie
Posts: 24
Joined: Fri Nov 15, 2002 12:00 am
Location: Germany

Post by Jan » Mon Nov 29, 2004 11:37 am

I just checked the history of the last steps... It was my fault. The first try was without as TPoint3DSeries and with Zvalues , the second with as TPoint3DSeries but with Zvalue (without the last 's') and that caused an error I obviously did not read fully...

Now it is working, thanks!

Jan

Post Reply