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

  1. unit Series_Bar3D;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Base, StdCtrls, TeEngine, Series, Bar3D, ExtCtrls, TeeProcs, Chart;
  8.  
  9. type
  10.   TBar3DForm = class(TBaseForm)
  11.     Series1: TBar3DSeries;
  12.     Label1: TLabel;
  13.     ComboBox1: TComboBox;
  14.     Button1: TButton;
  15.     procedure ComboBox1Change(Sender: TObject);
  16.     procedure FormCreate(Sender: TObject);
  17.     procedure Button1Click(Sender: TObject);
  18.     procedure FormShow(Sender: TObject);
  19.   private
  20.     { Private declarations }
  21.   public
  22.     { Public declarations }
  23.   end;
  24.  
  25. implementation
  26.  
  27. {$R *.DFM}
  28.  
  29. Uses EditChar;
  30.  
  31. procedure TBar3DForm.ComboBox1Change(Sender: TObject);
  32. begin
  33.   Case ComboBox1.ItemIndex of
  34.    0: Series1.BarStyle:=bsRectangle;
  35.    1: Series1.BarStyle:=bsPyramid;
  36.    2: Series1.BarStyle:=bsInvPyramid;
  37.    3: Series1.BarStyle:=bsCylinder;
  38.    4: Series1.BarStyle:=bsEllipse;
  39.    5: Series1.BarStyle:=bsArrow;
  40.    6: Series1.BarStyle:=bsRectGradient;
  41.    7: Series1.BarStyle:=bsCone;
  42.   end;
  43. end;
  44.  
  45. procedure TBar3DForm.FormCreate(Sender: TObject);
  46. begin
  47.   inherited;
  48.   Series1.Clear;
  49.   Series1.AddBar( 0, 250, 200, 'A', clRed );
  50.   Series1.AddBar( 1,  10, 200, 'B', clGreen );
  51.   Series1.AddBar( 2,  90, 100, 'C', clYellow );
  52.   Series1.AddBar( 3,  30,  50, 'D', clBlue );
  53.   Series1.AddBar( 4,  70, 150, 'E', clWhite );
  54.   Series1.AddBar( 5, 120, 150, 'F', clSilver );
  55. end;
  56.  
  57. procedure TBar3DForm.Button1Click(Sender: TObject);
  58. begin
  59.   inherited;
  60.   EditSeries(Self,Series1);
  61. end;
  62.  
  63. procedure TBar3DForm.FormShow(Sender: TObject);
  64. begin
  65.   inherited;
  66.   ComboBox1.ItemIndex:=6;
  67. end;
  68.  
  69. initialization
  70.   RegisterClass(TBar3DForm);
  71. end.
  72.