如何用不同的颜色区分Chart FX 曲线 |
尚未結案
|
bestandtop
一般會員 發表:2 回覆:2 積分:0 註冊:2003-01-03 發送簡訊給我 |
|
bestandtop
一般會員 發表:2 回覆:2 積分:0 註冊:2003-01-03 發送簡訊給我 |
|
zenjohn
一般會員 發表:5 回覆:16 積分:4 註冊:2002-12-10 發送簡訊給我 |
|
axsoft
版主 發表:681 回覆:1056 積分:969 註冊:2002-03-13 發送簡訊給我 |
引言: 我再程序中用到Chart FX 控件,用户需要在一个界面上看到电压最大值和最小值,并用不同颜色区别开。请问如何实现呀。您在BCB區問Delphi的問題當然沒人理你嘍! 1.改變NSeries為3 試試看!就會得到你要的Voltage的Max/mini/Normal 三個不同顏色的Bar 2.改變Nvalue的數值就可以得到N組數的Bar (Voltage的Max/mini/Normal 三個不同顏色的Bar ) 3.找一下 C:\Program Files\Borland\Delphi6\Ocx\Chartfx\cfx2ocx.hlp 裡頭有詳細的說明: This chapter provides a brief introduction to the titles and legends that can be set in a chart and covers the following topics: 3.1 Changing titles in a chart. 3.2 Changing X legend and series legend in a chart. 3.3 Restricting the user from change titles. 3.1 Changing titles in a chart To change the titles of a chart you can set the TITLE property with a title code in the index and the new string in the value of the property, as shown below: {Sets or Changes the chart titles} Chart1.Title[CHART_LEFTTIT] := 'Revenues'; Chart1.Title[CHART_BOTTOMTIT] := 'Months'; 3.2 Changing X legend and series legend To change the legends of a chart you use the Legend property for the X legend and SerLeg property for the series legend and the code required to change that legends will be: {Sets or changes the X legend } {this code assumes that hwndChart has 2 series and 4 points } Chart1.Legend[0] := 'Jan'; Chart1.Legend[1] := 'Feb'; Chart1.Legend[2] := 'Mar'; Chart1.Legend[3] := 'Apr'; Chart1.SerLeg[0] := 'Sales'; Chart1.SerLeg[1] := 'Revenues'; 3.3 Restricting the user from changing titles Although the library provides a way for the user to change the titles that the programmer specifies, you can restrict this in two ways: a. Creating the chart without the CS_TITLES style. b. Using the Style Property. Related Properties: Title, Legend, SerLeg, Style, Chart Styles, 網路志工聯盟----Visita網站http://www.vista.org.tw ---[ 發問前請先找找舊文章 ]--- |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |