home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Delphi / TeeChartPro / TeeChart5Delphi5Eval.exe / %MAINDIR% / Examples / Features / Surface_XYZFloat.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-09-10  |  1.5 KB  |  66 lines

  1. {$I TeeDefs.inc}
  2. unit Surface_XYZFloat;
  3.  
  4. interface
  5.  
  6. uses
  7.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  8.   Base, TeEngine, TeeSurfa, ExtCtrls, TeeProcs, Chart, StdCtrls, TeeTools;
  9.  
  10. type
  11.   TSurfaceFloatOther = class(TBaseForm)
  12.     Series1: TSurfaceSeries;
  13.     ChartTool1: TRotateTool;
  14.     procedure FormCreate(Sender: TObject);
  15.   private
  16.     { Private declarations }
  17.   public
  18.     { Public declarations }
  19.   end;
  20.  
  21. implementation
  22.  
  23. {$R *.DFM}
  24.  
  25. procedure TSurfaceFloatOther.FormCreate(Sender: TObject);
  26. var x,z : Integer;
  27. begin
  28.   inherited;
  29.  
  30.   Series1.IrregularGrid:=True; { <-- IMPORTANT ! means X and Z are float }
  31.  
  32.   for x:=1 to 10 do
  33.     for z:=1 to 10 do
  34.       Series1.AddXYZ( x / 10.0, sqrt(x*z), z / 5.0 {$IFNDEF D4},'',clTeeColor{$ENDIF} );
  35.  
  36.   { set palette colors to "10, strong" ... }
  37.   Series1.UseColorRange:=False;
  38.   Series1.UsePalette:=True;
  39.   Series1.PaletteStyle:=psStrong;
  40.   Series1.PaletteSteps:=10;
  41.  
  42.   { adjust some axes properties... }
  43.   Chart1.DepthAxis.Visible:=True;
  44.   Chart1.DepthAxis.AxisValuesFormat:='0.#';
  45.   Chart1.DepthAxis.Increment:=0.2;
  46.  
  47.   Chart1.BottomAxis.AxisValuesFormat:='0.#';
  48.   Chart1.BottomAxis.Increment:=0.1;
  49.  
  50.   { visual properties... }
  51.   Chart1.Chart3DPercent:=100;
  52.   with Chart1.View3DOptions do
  53.   begin
  54.     Orthogonal:=False;
  55.     Perspective:=50;
  56.     Rotation:=327;
  57.     Elevation:=352;
  58.     Zoom:=70;
  59.   end;
  60. end;
  61.  
  62. initialization
  63.   RegisterClass(TSurfaceFloatOther);
  64. end.
  65.  
  66.