看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: Win10, Linux, ...) Borland C++ 6 Builder 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): 我輸入一樣的資料到不同個DBchart 一個是我新增的,另一個是原本程式裡的 學長的圖跑出來X軸是顯示時間 我新增的圖是顯示奇怪的數字 http://i.imgur.com/tNcFFSF.png http://i.imgur.com/U1svfyv.png 程式還沒有跑之前,原本程式圖表的X軸就會顯示0:0:0 但是我不知道要怎麼設定 http://i.imgur.com/FWASsWs.png 我在網路查了很久都找不到答案 有人可以教我怎麼設定嗎 程式碼(Code):(請善用置底文網頁, 記得排版) for(int i=0;i<100;i++) { struct tm *loctime; char date[128]; unsigned int SEC; int year,month,day,hour,min,sec; time_t lt; lt=time(NULL); loctime = localtime (&lt); strftime (date, 128, "%Y,%m,%d,%H,%M,%S", loctime); sscanf(date,"%d,%d,%d,%d,%d,%d",&year,&month,&day,&hour,&min,&sec); Application->ProcessMessages(); TDateTime dt = EncodeDateTime( year, month, day, hour, min, sec ,i); Series22->AddXY(dt,i,"");//新增的圖表 Series1->AddXY(dt,i,"");//本來的圖表 } } 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.124.73.17 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1490884112.A.F27.html
serikafan: Series22->XValues->DateTime= true;03/31 11:11
感謝S大 剛剛試過已經解決困擾兩天的問題 ※ 編輯: jason200353 (27.247.229.253), 03/31/2017 12:18:44