B
blackczh
Unregistered / Unconfirmed
GUEST, unregistred user!
要在dbchart1上画线,横坐标是时间00:00:00开始到23:59:59结束,纵坐标是温度
with datamodule2do
begin
query1.close;
query1.sql.clear;
query1.sql.text:='select user.username,data.datatime,data.temperature from user inner join data on user.add=data.add where user.username='''+DBComboBOx1.text+''' and cast(data.datatime as char(10))='''formatdatetime('yyyy-mm-dd',datetimepicker1.date)+'''';
try
query1.open;
except
query1.execsql;
end;
while not datamodule2.query1.isemptydo
begin
dbchart1.series[0].datasource=datamodule2.query1;
dbchart1.series[0].active:=true;
dbchart1.series[0].addxy(datamodule2.query1.fields[1].asdatetime,datamodule2.query1.fields[2].asinteger,'',clred);
datamodule2.query1.next;
end;
end;
end;
怎么dbchart1一点反映都没有呢,高手帮看看,就这点分了,求大家了
with datamodule2do
begin
query1.close;
query1.sql.clear;
query1.sql.text:='select user.username,data.datatime,data.temperature from user inner join data on user.add=data.add where user.username='''+DBComboBOx1.text+''' and cast(data.datatime as char(10))='''formatdatetime('yyyy-mm-dd',datetimepicker1.date)+'''';
try
query1.open;
except
query1.execsql;
end;
while not datamodule2.query1.isemptydo
begin
dbchart1.series[0].datasource=datamodule2.query1;
dbchart1.series[0].active:=true;
dbchart1.series[0].addxy(datamodule2.query1.fields[1].asdatetime,datamodule2.query1.fields[2].asinteger,'',clred);
datamodule2.query1.next;
end;
end;
end;
怎么dbchart1一点反映都没有呢,高手帮看看,就这点分了,求大家了