用一个query控件
sql:select gname,sum(inum) as total
from import
where idate>=:'s_date' and idate<=:'e_date'
group bu gname我想用CHATT中的柱形图表示出来
X轴上表示不同的货物名(gname)
Y轴上是对应的数量(inum)
请问CHART的柱形图怎么来设置和query得出的数据连接起来
谢谢!
sql:select gname,sum(inum) as total
from import
where idate>=:'s_date' and idate<=:'e_date'
group bu gname我想用CHATT中的柱形图表示出来
X轴上表示不同的货物名(gname)
Y轴上是对应的数量(inum)
请问CHART的柱形图怎么来设置和query得出的数据连接起来
谢谢!
MySeries :TBarSeries;
begin
MySeries :=TBarSeries.Create(self);
with MySeries do
begin
Marks.Style :=smsvalue;
ParentChart:=DBChart1;
DataSource:=Dm.ADOQuery1;
XLabelsSource:='gname';
YValues.ValueSource:= 'inum';
CheckDatasource;
if (xlabel[0]='') then
xlabel[0] :='其它';
end;end;