全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:2707
推到 Plurk!
推到 Facebook!

如何把資料轉成圖表

答題得分者是:pceyes
lovemari
中階會員


發表:134
回覆:224
積分:76
註冊:2005-08-18

發送簡訊給我
#1 引用回覆 回覆 發表時間:2008-02-05 11:16:53 IP:60.248.xxx.xxx 訂閱
如何指定DBGrid 或者 StringGrid 中的 "指定欄位" 的資料(數字,比率%)
展出一各曲線圖或者比例圖嗎
------
Program : Delphi 7
DataBase : Oracle 9i
Client : ClientDataSet
pceyes
尊榮會員


發表:70
回覆:657
積分:1140
註冊:2003-03-13

發送簡訊給我
#2 引用回覆 回覆 發表時間:2008-02-05 21:49:06 IP:122.127.xxx.xxx 訂閱
其實跟DBGrid或StringGrid無關, 主要和DataSet有關啦!

請選Data Controls那一頁
加入一個 DBChart
按右鍵選 Edit Chart
選 Series那一頁
選 Data Source那頁
下拉選 DataSet
設定如下:
Dataset : AdoQuery1
Labels : 學號
Pie : 國文分數
我從書上抄來的 ,剩下的自己玩 8-)
------
努力會更接近成功
編輯記錄
pceyes 重新編輯於 2008-02-05 21:50:05, 註解 無‧
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#3 引用回覆 回覆 發表時間:2008-02-05 22:43:05 IP:219.68.xxx.xxx 未訂閱
請善用搜尋DBCHART, CHART
lovemari
中階會員


發表:134
回覆:224
積分:76
註冊:2005-08-18

發送簡訊給我
#4 引用回覆 回覆 發表時間:2008-02-12 16:36:43 IP:60.248.xxx.xxx 訂閱

===================引 用 pceyes 文 章===================
其實跟DBGrid或StringGrid無關, 主要和DataSet有關啦!

請選Data Controls那一頁
加入一個 DBChart
按右鍵選 Edit Chart
選 Series那一頁
選 Data Source那頁
下拉選 DataSet
設定如下:
Dataset : AdoQuery1
Labels : 學號
Pie : 國文分數
我從書上抄來的 ,剩下的自己玩 8-)

===================引 用 pceyes 文 章===================

Dear 大大

我再下拉選擇 DataSet 的時候
出現錯誤訊息

"No Server available"

ps. 我是用 Client Data Set 去連接遠端資料庫作SQL Search,請問有解決辦法嗎?
------
Program : Delphi 7
DataBase : Oracle 9i
Client : ClientDataSet
編輯記錄
lovemari 重新編輯於 2008-02-12 16:37:08, 註解 無‧
pceyes
尊榮會員


發表:70
回覆:657
積分:1140
註冊:2003-03-13

發送簡訊給我
#5 引用回覆 回覆 發表時間:2008-02-12 17:12:22 IP:220.141.xxx.xxx 訂閱
------
努力會更接近成功
lovemari
中階會員


發表:134
回覆:224
積分:76
註冊:2005-08-18

發送簡訊給我
#6 引用回覆 回覆 發表時間:2008-02-13 11:54:24 IP:60.248.xxx.xxx 訂閱

===================引 用 pceyes 文 章===================
我試可以的, 送一個Demo給你
http://delphi.ktop.com.tw/download.php?download=upload/47b1629ff236f_clientdatasetdemo.zip


====================================================

首先感謝你的DEMO
可是我在跑這段

[code delphi]
procedure TForm1.FormShow(Sender: TObject);
begin
csTemp.Active := true;
end;
[/code]
就會出現 No server available 這各訊息
我的資料庫不是local的 怎辦

為什麼 大大你的一開始DBGrid 就有資料出來可以讓DBchart 抓呢?
ps. csTemp = 你的CDS
------
Program : Delphi 7
DataBase : Oracle 9i
Client : ClientDataSet
編輯記錄
lovemari 重新編輯於 2008-02-13 13:36:05, 註解 無‧
pceyes
尊榮會員


發表:70
回覆:657
積分:1140
註冊:2003-03-13

發送簡訊給我
#7 引用回覆 回覆 發表時間:2008-02-21 13:35:01 IP:122.127.xxx.xxx 訂閱
Place a TButton on your Form and go to the OnClick event .
Copy the following code at the Button1.OnClick event:

A description of the Add method and other available methods and properties is available at design time via the context sensitive help included with TeeChart. Place the cursor on the word Add in your code and press F1 for a full description of the method.
Return to your code and press F9 again to run the project.
Press Button1 to see the Pie Chart appear - the code works!

------
努力會更接近成功
系統時間:2024-04-26 11:54:21
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!