原創(chuàng)|使用教程|編輯:郝浩|2013-04-17 11:00:22.000|閱讀 1250 次
概述:ProEssentials是一個(gè)非常好用的實(shí)時(shí)曲線繪圖控件,本文討論坐標(biāo)注釋(Annotations)的使用以及如何創(chuàng)建自定義的坐標(biāo)刻度。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門(mén)軟控件火熱銷售中 >>
ProEssentials是一個(gè)非常好用的實(shí)時(shí)曲線繪圖控件,它對(duì)繪制圖表以及圖表分析功能所需要的數(shù)據(jù)和方法進(jìn)行了簡(jiǎn)單封裝,可以輕松實(shí)現(xiàn)專業(yè)圖表軟件的效果。本文討論P(yáng)roEssentials坐標(biāo)注釋(Annotations)的使用以及如何創(chuàng)建自定義的坐標(biāo)刻度。
禁用掉ProEssentials默認(rèn)刻度,使用自定義的刻度線和網(wǎng)格線。
自定義Y軸的參數(shù):
| HorzLineAnnotation | Y location of line annotation |
| HorzLineAnnotationType | Line type, generally GridTick(7) or GridLine(8) |
| HorzLineAnnotationText | 與注釋相關(guān)的文本,可包含各種justification codes |
| HorzLineAnnotationColor | Color of annotation |
| HorzLineAnnotationAxis | 多軸時(shí)的Axis location (0 - 5) |
| HorzLineAnnotHotSpot | 指定非0的hot spot |
自定義X軸的參數(shù):
| VertLineAnnotation | X location of line annotation |
| VertLineAnnotationType | Line type, generally GridTick(7) or GridLine(8) |
| VertLineAnnotationText | 與注釋相關(guān)的文本,可包含各種justification codes |
| VertLineAnnotationColor | Color of annotation |
| VertLineAnnotHotSpot | 指定非0的hot spot |
下面這段代碼顯示了如何創(chuàng)建一個(gè)帶有文本標(biāo)簽的Y軸:
'** Disable default scale **' Pego1.ShowYAxis = PESA_EMPTY '** Generally, a custom y axis will need manual range control **' Pego1.ManualScaleControlY = PEMSC_MINMAX Pego1.ManualMinY = 0 Pego1.ManualMaxY = 1000 '** Create custom grid lines with HorzLineAnnotations **' '** Note that GridLineControl will control these annotations **' Pego1.HorzLineAnnotation(0) = 200 Pego1.HorzLineAnnotationType(0) = PELAT_GRIDLINE Pego1.HorzLineAnnotationText(0) = "|LLow Value" Pego1.HorzLineAnnotation(1) = 500 Pego1.HorzLineAnnotationType(1) = PELAT_GRIDLINE Pego1.HorzLineAnnotationText(1) = "|LMedium Value" Pego1.HorzLineAnnotation(2) = 800 Pego1.HorzLineAnnotationType(2) = PELAT_GRIDLINE Pego1.HorzLineAnnotationText(2) = "|LHigh Value" Pego1.HorzLineAnnotation(3) = 350 Pego1.HorzLineAnnotationType(3) = PELAT_GRIDTICK Pego1.HorzLineAnnotationText(3) = "" Pego1.HorzLineAnnotation(4) = 650 Pego1.HorzLineAnnotationType(4) = PELAT_GRIDTICK Pego1.HorzLineAnnotationText(4) = "" '** Set LeftMargin to allocate space for line annotation text **' '** Use the longest string used in annotations. Pego1.LeftMargin = "Medium Value " '** Set this to see annotations **' Pego1.ShowAnnotations = True '** Increase line annotation text size **' Pego1.LineAnnotationTextSize = 100 '** Put Grid In Front **' Pego1.GridInFront = True
如圖所示:

使用CustomGridNumber Event,可以改變坐標(biāo)上的文本表現(xiàn)形式。當(dāng)以下屬性設(shè)置為T(mén)rue時(shí),將會(huì)啟動(dòng)相應(yīng)的事件進(jìn)程:
| CustomGridNumbersY | 啟動(dòng)自定義Y軸 |
| CustomGridNumbersX | 啟動(dòng)自定義X軸 |
| CustomGridNumbersRY | 啟動(dòng)自定義Right Y軸 |
| CustomGridNumbersTX | 啟動(dòng)自定義Top X軸 |
| CustomGridNumbersZ | 啟動(dòng)自定義的Z軸 |
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@ke049m.cn
文章轉(zhuǎn)載自:慧都控件