轉(zhuǎn)帖|其它|編輯:郝浩|2012-10-25 15:29:36.000|閱讀 1830 次
概述:TeeChart是delphi里面一個(gè)標(biāo)準(zhǔn)的圖形顯示控件。它可以靜態(tài)設(shè)計(jì)(at design time)也可以動(dòng)態(tài)生成。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
TeeChart是Delphi里面一個(gè)標(biāo)準(zhǔn)的圖形顯示控件。它可以靜態(tài)設(shè)計(jì)(at design time)也可以動(dòng)態(tài)生成。下面是我在使用過(guò)程中的一些心得體會(huì),比較雜,但也許對(duì)你有用。
TeeChart的繼承關(guān)系
TeeChart常見問(wèn)題及使用技巧
1、TChart中如何實(shí)現(xiàn)只有Y軸的放大與縮小功能?
2、如何固定TChart中的坐標(biāo),不使TChart中的坐標(biāo)跟隨Series的變化而變化?
//設(shè)置底座標(biāo) with myChart.BottomAxis do begin Automatic:=false; Minimum:=0; LabelStyle := talText; end; //設(shè)置左坐標(biāo) with myChart.LeftAxis do begin Automatic:=false; Minimum:=0; Title.Angle:=270; Title.Font:=Self.Font; Title.Font.Charset:=ANSI_CHARSET; Title.Font.Name:='@宋體'; Grid.Visible := False; end; //設(shè)置右坐標(biāo) with myChart.RightAxis do begin Automatic:=false; Title.Font:=Self.Font; Title.Font.Charset:=ANSI_CHARSET; Title.Font.Name:='@宋體'; Title.Caption:='累計(jì)百分比(%)'; Maximum:=100; Minimum:=0; end;
3、如何刪除一個(gè)圖形中的一個(gè)點(diǎn)?
4、如何修改一個(gè)點(diǎn)的X或者Y值?
LineSeries1.YValue[3] := 27.1 ; {In Bubble Series} BubbleSeries1.RadiusValues.Value[ 8 ] := 8.1 ; {In Pie Series} PieSeries1.PieValues.Value[ 3 ] := 111 ;
5、如果橫坐標(biāo)是時(shí)間(日期),如何進(jìn)行設(shè)置?
{First, you need to set the DateTime property to True in the desired X and/or Y values list.} LineSeries1.XValues.DateTime := True ; {Second, use the same above described methods, but give the values as Date, Time or DateTime values} LineSeries1.AddXY( EncodeDate( 1996 , 1 , 23 ) , 25.4 , 'Barcelona' , clGreen );
6、如何在chart中畫出的曲線某個(gè)點(diǎn)上標(biāo)記出該點(diǎn)的值?
Series.Marks.Visible:=true; Series.Marks.Style:=smsValue;
7、如何設(shè)置橫軸或者縱軸的增長(zhǎng)率?
Chart.BottomAxis.Increment := DataTimeStep[ dtOneHour ] ; Chart.RightAxis.Increment := 1000;
8、如何對(duì)圖象進(jìn)行縮放?
TeeChart可以繪制的圖形:
TeeChart的實(shí)時(shí)繪制
實(shí)時(shí)繪制對(duì)機(jī)器性能要求比較高,因此我們?cè)诰幊痰臅r(shí)候要注意下面幾個(gè)方面:
滾動(dòng)
TChart有4種scroll選擇(AllowPanning屬性),分別是 不允許Scroll ( pmNone) ; 水平Scroll (pmHorizontal) ; 垂直Scroll (pmVertical) ; 水平和垂直Scroll (pmBoth)
Procedure Scroll(Const Offset:Double; CheckLimits:Boolean);
例子如下:
Chart1.BottomAxis.Scroll( 1000, True );
這段代碼也等同于
With Chart1.BottomAxis do Begin Automatic:=false; SetMinMax( Minimum+1000, Maximum+1000 ); End;
精彩內(nèi)容 未完待續(xù)……
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:新浪博客