test

xiaoxiao2021-03-05  22

var myseries, myseries1: TFastLineSeries; dt: Tdatetime; t, h, sdt: string; beginADOQuery1.Active: = false; chart1.SeriesList.Clear; myseries: = TFastLineSeries.Create (self); myseries1: = TFastLineSeries.Create (self ); myseries.title: = 'temperature'; myseries1.title: = 'humidity'; myseries.parentchart: = chart1; myseries1.parentchart: = chart1; chart1.bottomaxis.setminmax (0,100); with adoquery1 do beg, close; sql .Clear; sql.Add ( 'select jftinf, jfhinf, evttime from jfthdevtlog order by evttime desc'); open; while not eof do begin dt:. = FieldByName ( 'evttime') AsDateTime; sdt: = FormatDateTime ( 'YYYY / MM / DD HH: MM: SS ', DT); T: = FIELDBYNAME (' JFTINF '). Asstring; H: = FieldbyName (' jfhinf '). Asstring; MySeries.Addxy (DT, Strtofloat (T), SDT, CLRED); MySeries1.Addxy (DT, StrtOfloat (H), SDT, CLGreen); // next;

转载请注明原文地址:https://www.9cbs.com/read-39112.html

New Post(0)