loglab.pas
来自「就是这本书的随书代码。包括《实战Delphi 5.x-分布式多层应用系统篇》」· PAS 代码 · 共 57 行
PAS
57 行
{*********************************************}
{ TeeChart Delphi Component Library }
{ Logarithmic Labels Demo }
{ Copyright (c) 1996 by David Berneda }
{ All rights reserved }
{*********************************************}
unit LogLab;
{$P-}
interface
{ This form shows how custom Axis labels can be specified }
{ The Chart.OnGetNextAxisLabel event is used to supply the axis with
custom label positions and values. }
uses
WinProcs, WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, TeeProcs, TeEngine, Chart, Series, StdCtrls, Buttons;
type
TLogLabelsForm = class(TForm)
Chart1: TChart;
Series1: TFastLineSeries;
Panel1: TPanel;
BitBtn2: TBitBtn;
Memo1: TMemo;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
{$R *.DFM}
procedure TLogLabelsForm.FormCreate(Sender: TObject);
begin
{ Axis settings }
Chart1.BottomAxis.Logarithmic:=True;
Chart1.BottomAxis.TickOnLabelsOnly:=True;
Chart1.BottomAxis.SetMinMax( 10.0, 1000);
Chart1.LeftAxis.Logarithmic:=True;
Chart1.LeftAxis.TickOnLabelsOnly:=True;
Chart1.LeftAxis.SetMinMax( 10.0, 1000);
{ adding XY values to Series1 }
Series1.XValues.DateTime:=False;
Series1.AddXY( 100, 100, '', clTeeColor );
Series1.AddXY( 500, 200, '', clTeeColor );
Series1.AddXY( 800, 300, '', clTeeColor );
Series1.AddXY( 200, 200, '', clTeeColor );
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?