home *** CD-ROM | disk | FTP | other *** search
- {*********************************************}
- { TeeChart Pro 4 example }
- { Copyright (c) 1995-1998 by David Berneda }
- { All rights reserved }
- {*********************************************}
- unit uticklab;
-
- interface
-
- { This example shows how to use the Axis
- TickOnLabelsOnly property.
-
- This property is used to control if axis grid lines and ticks
- are displayed at label positions or at all Axis Increment
- positions.
-
- Explanation:
- By default, the Axis avoids label overlapping. This is
- controlled with the Axis LabelsSeparation property.
- When the Axis skip labels that would overlap, it also
- skips drawing grid lines and ticks, unless
- TickOnLabelsOnly property is False.
-
- }
- uses
- WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- TeEngine, Series, ExtCtrls, TeeProcs, Chart, StdCtrls, Buttons;
-
- type
- TFormTicksLabels = class(TForm)
- Chart1: TChart;
- Series1: TFastLineSeries;
- CheckBox1: TCheckBox;
- Button1: TButton;
- Label1: TLabel;
- procedure FormCreate(Sender: TObject);
- procedure Button1Click(Sender: TObject);
- procedure CheckBox1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- implementation
-
- {$R *.DFM}
-
- procedure TFormTicksLabels.FormCreate(Sender: TObject);
- var t:Longint;
- begin
- for t:=1 to 50 do Series1.Add(Random(100),IntToStr(t),clTeeColor);
- end;
-
- procedure TFormTicksLabels.Button1Click(Sender: TObject);
- begin
- Close;
- end;
-
- procedure TFormTicksLabels.CheckBox1Click(Sender: TObject);
- begin
- Chart1.BottomAxis.TickOnLabelsOnly:=CheckBox1.Checked;
- end;
-
- end.
-