home *** CD-ROM | disk | FTP | other *** search
- unit uothpie;
-
- interface
-
- uses
- WinProcs,WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- TeeComma, TeEngine, Series, StdCtrls, TeeProcs, Chart, ExtCtrls;
-
- type
- TOtherPieForm = class(TForm)
- Panel1: TPanel;
- Chart1: TChart;
- Button1: TButton;
- Memo1: TMemo;
- CheckBox1: TCheckBox;
- Series1: TPieSeries;
- TeeCommander1: TTeeCommander;
- procedure Button1Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure CheckBox1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- OtherPieForm: TOtherPieForm;
-
- implementation
-
- {$R *.DFM}
-
- procedure TOtherPieForm.Button1Click(Sender: TObject);
- begin
- Close;
- end;
-
- procedure TOtherPieForm.FormCreate(Sender: TObject);
- begin
- Series1.FillSampleValues(10);
- end;
-
- procedure TOtherPieForm.CheckBox1Click(Sender: TObject);
- begin
- if CheckBox1.Checked then
- begin
- { lets group slices with a value lower than the minimum + 100 }
- With Series1.OtherSlice do
- begin
- Style:=poBelowValue;
- Value:=Series1.PieValues.MinValue+100;
- Text:='Other < '+FloatToStr(Value);
- end;
-
- { another way, using percents. Group slices below 10% :
-
- Series1.OtherSlice.Style:=poBelowPercent;
- Series1.OtherSlice.Value:=10;
- }
- end
- else
- Series1.OtherSlice.Style:=poNone;
- end;
-
- end.
-