Invisible surface

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
tombradshaw
Newbie
Newbie
Posts: 5
Joined: Tue May 18, 2004 4:00 am

Invisible surface

Post by tombradshaw » Wed Jul 21, 2004 3:39 pm

Hi,
I'm trying to create a surface that uses floating point X Y and Z values ( also the X and Z values may not be a fixed distance apart, but they are in this example). If you try the example you get a simple surface :-

aSurfaceSeries := TSurfaceSeries.Create(Chart1);
aSurfaceSeries.ParentChart := Chart1;
aSurfaceSeries.Transparency := 15;
aSurfaceSeries.Depth := 1;
aSurfaceSeries.Marks.Visible := true;

for i := 0 to 10 do
for j := 0 to 10 do
aSurfaceSeries.AddXYZ(j, Random(i * j) ,i, '', clred);

now try making the Z a non integer value :-
aSurfaceSeries.AddXYZ(j, Random(i * j) ,i + 0.5, '', clred);

The surface is there because the marks are visible but the surface is invisible? the same thing happens with the X value.

Why? and how can I get this to work? BTW we are using Delphi 7 with TeeChart Pro 7.
Thanks
Tom

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

Post by Pep » Thu Jul 22, 2004 12:44 am

Hi Tom,

have you try setting the IrregularGrid property to True (Series1.IrregularGrid := True) befoe to add the data ?

tombradshaw
Newbie
Newbie
Posts: 5
Joined: Tue May 18, 2004 4:00 am

Post by tombradshaw » Thu Jul 22, 2004 8:35 am

Yes that works, Thanks,
although to be picky, is a Z of i + 0.5, irregular? :-)

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

Post by Pep » Thu Jul 22, 2004 10:42 am

Hi Tom,

using float values you must set IrregularGrid to true.

Post Reply