急需解决关于:TDBChart(因初次进入大富翁,不知分值使用方法,所以上一次200分一次给出,现囊肿羞涩,所以...)(0分)

L

liuyy

Unregistered / Unconfirmed
GUEST, unregistred user!
[:)]
请问:TDBChart控件中,
TLineSeries类型根据动态数据集生成图形的方法是否不同于TBarSeries?
做了个程序,
TBarSeries根据程序中不同的查询结果集可出现不同的图形显示(代码如下),
adoq_chart.Close ;
adoq_chart.SQL.Text :='SELECT T1.Shop_Id,T1.sale_year,T2.Shop_Id,T2.Shop_Name,'+
'SUM(T1.Plan_ReturnMoney) as Sum_PlanMoney,'+
'SUM(T1.Fact_ReturnMoney) as Sum_FactMoney'+
' FROM Tab_ReturnMoney As T1,Tab_Shop As T2'+
' WHERE T1.shop_id=T2.shop_id'+
' AND T1.shop_id=''001'''+
' GROUP BY T1.Shop_Id,T1.sale_year,'+
'T2.Shop_Id,T2.Shop_Name'+
' ORDER BY T1.Shop_Id';
adoq_chart.open;

//--计划部分设置
MySeriesBarPlan:=TBarSeries.Create( Self );
With MySeriesBarPlan do
begin
Title:='计划';
SeriesColor :=clGreen;
ParentChart:=DBChart2;
DataSource:=adoq_chart;
Marks.Style :=smsValue;
XLabelsSource:='Shop_Id';
YValues.ValueSource:= 'Sum_PlanMoney';
end;
//--实际部分设置
MySeriesBarFact:=TBarSeries.Create( Self );
With MySeriesBarFact do
begin
Title:='实际';
SeriesColor :=clRed;
ParentChart:=DBChart2;
DataSource:=adoq_chart;
Marks.Style :=smsValue;
XLabelsSource:='Shop_Id';
YValues.ValueSource:= 'Sum_FactMoney';
end;

但同种方法TLineSeries就无法显示图形,
请教,TLineSeries的操作方法。
谢谢!!
 
帮你提前!
 
jrq:
为了答谢你对我的支持,
来http://www.delphibbs.com/delphibbs/dispq.asp?lid=1018627领分吧!
 

Similar threads

顶部