Add a 3D Surface at run time

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
S-ON-S
Newbie
Newbie
Posts: 12
Joined: Tue Jun 07, 2005 4:00 am

Add a 3D Surface at run time

Post by S-ON-S » Mon Feb 13, 2012 2:07 pm

Hi there,

How can I add a 3D Surface at run time?
And fill with x, y and z values?

Thanks in advance,

Dennis

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Add a 3D Surface at run time

Post by Yeray » Tue Feb 14, 2012 8:51 am

Hi,

All the series can be added at runtime. For example:

Code: Select all

uses TeeSurfa;

procedure TForm1.FormCreate(Sender: TObject);
var x, y, z: Integer;
begin
  Chart1.Aspect.Orthogonal:=false;
  Chart1.Chart3DPercent:=100;
  Chart1.Aspect.Zoom:=75;
  Chart1.Legend.Visible:=false;

  with Chart1.AddSeries(TSurfaceSeries) as TSurfaceSeries do
  begin
    for x:=0 to 20 do
      for z:=0 to 20 do
      begin
        y:=x*z;
        AddXYZ(x, y, z);
      end;
  end;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply