home *** CD-ROM | disk | FTP | other *** search
- {*********************************************}
- { TeeChart Delphi Component Library }
- { Depth Axis Demo }
- { Copyright (c) 1995-1998 by David Berneda }
- { All rights reserved }
- {*********************************************}
- unit UDepAx;
-
- interface
-
- uses
- WinProcs,WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, TeeSurfa, TeePoin3, TeEngine, Series, TeeProcs, Chart,
- TeeComma, ExtCtrls;
-
- type
- TDepthAxisForm = class(TForm)
- Panel1: TPanel;
- Memo1: TMemo;
- Button1: TButton;
- TeeCommander1: TTeeCommander;
- Chart1: TChart;
- Series1: TLineSeries;
- Series2: TLineSeries;
- Series3: TLineSeries;
- Series4: TPoint3DSeries;
- CheckBox1: TCheckBox;
- CheckBox2: TCheckBox;
- CheckBox3: TCheckBox;
- procedure FormCreate(Sender: TObject);
- procedure CheckBox1Click(Sender: TObject);
- procedure CheckBox2Click(Sender: TObject);
- procedure Button1Click(Sender: TObject);
- procedure CheckBox3Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- implementation
-
- {$R *.DFM}
-
- procedure TDepthAxisForm.FormCreate(Sender: TObject);
- begin
- Series1.FillSampleValues(50);
- Series2.FillSampleValues(50);
- Series3.FillSampleValues(50);
- Series4.FillSampleValues(50);
- end;
-
- procedure TDepthAxisForm.CheckBox1Click(Sender: TObject);
- begin
- { Show or hide the Depth axis }
- Chart1.DepthAxis.Visible:=CheckBox1.Checked;
-
- { Enable / disable the "grid" checkbox }
- CheckBox3.Enabled:=CheckBox1.Checked;
- end;
-
- procedure TDepthAxisForm.CheckBox2Click(Sender: TObject);
- begin
- { We show / hide a Point3D series to make change
- the Depth axis from showing Series names to show
- Z values.
- }
- if CheckBox2.Checked then
- begin
- Series4.Active:=False;
- Series1.Active:=True;
- Series2.Active:=True;
- Series3.Active:=True;
- { change the Font size }
- Chart1.DepthAxis.LabelsFont.Size:=10;
- Chart1.DepthAxis.LabelsFont.Color:=clNavy;
- end
- else
- begin
- Series4.Active:=True;
- Series1.Active:=False;
- Series2.Active:=False;
- Series3.Active:=False;
- { change the Font size }
- Chart1.DepthAxis.LabelsFont.Size:=8;
- Chart1.DepthAxis.LabelsFont.Color:=clMaroon;
- end
- end;
-
- procedure TDepthAxisForm.Button1Click(Sender: TObject);
- begin
- Close;
- end;
-
- procedure TDepthAxisForm.CheckBox3Click(Sender: TObject);
- begin
- { We can change any axis property, like
- axis Grid lines }
- Chart1.DepthAxis.Grid.Visible:=CheckBox3.Checked;
- end;
-
- end.
-