Creat LineSeries with ColorGridSeries Y Values?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
cfalcot
Newbie
Newbie
Posts: 10
Joined: Tue Nov 18, 2003 5:00 am
Location: France

Creat LineSeries with ColorGridSeries Y Values?

Post by cfalcot » Fri Feb 18, 2005 10:00 am

Hi,

I have a TColorGridSeries (named Series10 - affected with ChartTool5) and a TLineSeries(named Series1). I would like use the X and Z value to draw the LineSeries.

Is it possible to do somthing like this(?):

Code: Select all

For i:= 1 to 10 do
  Series1.AddXY(Series10.GetXZValue(ChartTool5.XValue, i), i);
Unfortunaty this not work: all Values are null. In helpfiles I find that GetXZValue returns zero if OnGetYValue is not assigned. What OnGetYValue need to be assigned on: I don't find.

Thank's for your help...

Cyril

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

Post by Pep » Mon Feb 21, 2005 3:02 pm

Hi Cyril,

the GetXZValue does not return value for specific index. This event can be used only for constructing the surface from formula. i.e. you have to specify y=y(x,z) -> in this case the GetXZValue will return y for specific x and z.
If you simply populate series with data (not by specifying a function) the GetXZValue will not work i.e. it will always return 0 (or -1?).
There is an example of this method in the Demo Features project under the "All Features -> Chart styles -> Extended ", the "Surface" (first) example. To get the YValues of the ColorGrid Series you can use :
TColorGridSeries.Value[x,z]

cfalcot
Newbie
Newbie
Posts: 10
Joined: Tue Nov 18, 2003 5:00 am
Location: France

Post by cfalcot » Wed Feb 23, 2005 12:40 pm

Hi!
:D - Thank's a lot your your answer! It will help me a lot.

Cyril

Post Reply