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

  1. unit Line_Stack;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Base, StdCtrls, Series, TeEngine, ExtCtrls, TeeProcs, Chart;
  8.  
  9. type
  10.   TLineStack = class(TBaseForm)
  11.     Series1: TLineSeries;
  12.     Series2: TLineSeries;
  13.     Series3: TLineSeries;
  14.     Label1: TLabel;
  15.     ComboBox1: TComboBox;
  16.     Series4: TLineSeries;
  17.     procedure ComboBox1Change(Sender: TObject);
  18.     procedure FormCreate(Sender: TObject);
  19.     procedure FormShow(Sender: TObject);
  20.   private
  21.     { Private declarations }
  22.   public
  23.     { Public declarations }
  24.   end;
  25.  
  26. implementation
  27.  
  28. {$R *.DFM}
  29.  
  30. procedure TLineStack.ComboBox1Change(Sender: TObject);
  31. begin
  32.   Case ComboBox1.ItemIndex of
  33.     0: Series1.Stacked:=cssNone;
  34.     1: Series1.Stacked:=cssOverlap;
  35.     2: Series1.Stacked:=cssStack;
  36.     3: Series1.Stacked:=cssStack100;
  37.   end;
  38. end;
  39.  
  40. procedure TLineStack.FormCreate(Sender: TObject);
  41. begin
  42.   inherited;
  43.   Series1.FillSampleValues(10);
  44.   Series2.FillSampleValues(10);
  45.   Series3.FillSampleValues(10);
  46.   Series4.FillSampleValues(10);
  47. end;
  48.  
  49. procedure TLineStack.FormShow(Sender: TObject);
  50. begin
  51.   inherited;
  52.   ComboBox1.ItemIndex:=0;
  53. end;
  54.  
  55. initialization
  56.   RegisterClass(TLineStack);
  57. end.
  58.