java teechart怎么用_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的提示,可以為預(yù)定義值,如:smsLabelValue(頂點值)
TSeries.Title為右邊標簽框中的文本
TSeries.Legend為容納TSeries.Title的容器
總結(jié)
以上是生活随笔為你收集整理的java teechart怎么用_TeeChart使用范例的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java bean状态_无状态和有状态企
- 下一篇: bool类型0和1真假_MySQL整理5