zoukankan      html  css  js  c++  java
  • TeeChart使用范例

    在窗体上加入TeeChart控件,并通过属性加入4个TLineSeries,分别命名为Series1,Series2,Series3,Series4,并添加一按钮Button1,其Click事件为:

    procedure TForm1.Button1Click(Sender:TObject);

    begin

    Series1.FillSampleValues(200);

    Series2.FillSampleValues(200);

    Series3.FillSampleValues(200);

    Series4.FillSampleValues(200);

    with chart1.LeftAxis do

    begin

    startPosition :=0;

    EndPosition :=25;

    Axis.Color:=clRed;

    end;

    Axis1 :=TChartAxis.Create(Chart1);

    with Axis1 do

    begin

    startPosition :=25;

    EndPosition :=50;

    Axis.Color :=clGreen;

    end;

    Series2.CustomVertAxis :=Axis1;

     

    Axis2 :=TChartAxis.Create(chart1);

    with Axis2 do

    begin

    startPosition :=50;

    EndPosition :=75;

    Axis.Color :=clBlue;

    end;

    Series3.CustomVertAxis :=Axis2;

     

    Axis3 :=TChartAxis.Create(chart1);

    with Axis3 do

    begin

    startPosition :=75;

    EndPosition :=100;

    Axis.Color :=clYellow;

    end;

    Series4.CustomVertAxis :=Axis3;

    end;

    TSeries.Mark属性,为每个Series point的提示,可以为预定义值,如:smsLabelValue(顶点值)

    TSeries.Title为右边标签框中的文本

    TSeries.Legend为容纳TSeries.Title的容器

  • 相关阅读:
    Chap5:操作文件和目录[The Linux Command Line]
    ABC3
    ABC2
    ABC
    Spring MVC / Boot
    Usefull Resources
    [ Learning ] Design Pattens
    [ Learning ] Spring Resources
    URL Resources
    [ Windows BAT Script ] BAT 脚本获取windows权限
  • 原文地址:https://www.cnblogs.com/djcsch2001/p/2035792.html
Copyright © 2011-2022 走看看