原創|使用教程|編輯:郝浩|2013-04-17 11:00:22.000|閱讀 1240 次
概述:ProEssentials是一個非常好用的實時曲線繪圖控件,本文討論坐標注釋(Annotations)的使用以及如何創建自定義的坐標刻度。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
ProEssentials是一個非常好用的實時曲線繪圖控件,它對繪制圖表以及圖表分析功能所需要的數據和方法進行了簡單封裝,可以輕松實現專業圖表軟件的效果。本文討論ProEssentials坐標注釋(Annotations)的使用以及如何創建自定義的坐標刻度。
禁用掉ProEssentials默認刻度,使用自定義的刻度線和網格線。
自定義Y軸的參數:
HorzLineAnnotation | Y location of line annotation |
HorzLineAnnotationType | Line type, generally GridTick(7) or GridLine(8) |
HorzLineAnnotationText | 與注釋相關的文本,可包含各種justification codes |
HorzLineAnnotationColor | Color of annotation |
HorzLineAnnotationAxis | 多軸時的Axis location (0 - 5) |
HorzLineAnnotHotSpot | 指定非0的hot spot |
自定義X軸的參數:
VertLineAnnotation | X location of line annotation |
VertLineAnnotationType | Line type, generally GridTick(7) or GridLine(8) |
VertLineAnnotationText | 與注釋相關的文本,可包含各種justification codes |
VertLineAnnotationColor | Color of annotation |
VertLineAnnotHotSpot | 指定非0的hot spot |
下面這段代碼顯示了如何創建一個帶有文本標簽的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,可以改變坐標上的文本表現形式。當以下屬性設置為True時,將會啟動相應的事件進程:
CustomGridNumbersY | 啟動自定義Y軸 |
CustomGridNumbersX | 啟動自定義X軸 |
CustomGridNumbersRY | 啟動自定義Right Y軸 |
CustomGridNumbersTX | 啟動自定義Top X軸 |
CustomGridNumbersZ | 啟動自定義的Z軸 |
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件