home *** CD-ROM | disk | FTP | other *** search
/ PC Expert 29 / Pce29cd.iso / RUNIMAGE / DELPHI40 / DEMOS / TEECHART / LOGLAB.PAS < prev    next >
Pascal/Delphi Source File  |  1998-06-16  |  2KB  |  57 lines

  1. {*********************************************}
  2. { TeeChart Delphi Component Library           }
  3. { Logarithmic Labels Demo                     }
  4. { Copyright (c) 1996 by David Berneda         }
  5. { All rights reserved                         }
  6. {*********************************************}
  7. unit LogLab;
  8. {$P-}
  9.  
  10. interface
  11.  
  12. { This form shows how custom Axis labels can be specified }
  13. { The Chart.OnGetNextAxisLabel event is used to supply the axis with
  14.   custom label positions and values. }
  15.  
  16. uses
  17.   WinProcs, WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  18.   ExtCtrls, TeeProcs, TeEngine, Chart, Series, StdCtrls, Buttons;
  19.  
  20. type
  21.   TLogLabelsForm = class(TForm)
  22.     Chart1: TChart;
  23.     Series1: TFastLineSeries;
  24.     Panel1: TPanel;
  25.     BitBtn2: TBitBtn;
  26.     Memo1: TMemo;
  27.     procedure FormCreate(Sender: TObject);
  28.   private
  29.     { Private declarations }
  30.   public
  31.     { Public declarations }
  32.   end;
  33.  
  34. implementation
  35.  
  36. {$R *.DFM}
  37.  
  38. procedure TLogLabelsForm.FormCreate(Sender: TObject);
  39. begin
  40.   { Axis settings }
  41.   Chart1.BottomAxis.Logarithmic:=True;
  42.   Chart1.BottomAxis.TickOnLabelsOnly:=True;
  43.   Chart1.BottomAxis.SetMinMax( 10.0, 1000);
  44.   Chart1.LeftAxis.Logarithmic:=True;
  45.   Chart1.LeftAxis.TickOnLabelsOnly:=True;
  46.   Chart1.LeftAxis.SetMinMax( 10.0, 1000);
  47.  
  48.   { adding XY values to Series1 }
  49.   Series1.XValues.DateTime:=False;
  50.   Series1.AddXY( 100, 100, '', clTeeColor );
  51.   Series1.AddXY( 500, 200, '', clTeeColor );
  52.   Series1.AddXY( 800, 300, '', clTeeColor );
  53.   Series1.AddXY( 200, 200, '', clTeeColor );
  54. end;
  55.  
  56. end.
  57.