您当前的位置:delphi教程 > Delphi组件开发 > DBChart中series的动态添加问题. 满分求教!!!

DBChart中series的动态添加问题. 满分求教!!!

在DBChart中动态添加series,添加后只有最后一次添加的series能正常显示,其他的都不在DBChart上显示出来.    
   
  源码:  
   
  procedure   TMDIChild.AddLine;  
  var  
      MySeries:   TFastLineSeries;  
  begin      
      MySeries   :=   TfastLineSeries.Create(self);  
      Myseries.ParentChart   :=   MyDBChart;  
      MySeries.Active   :=   false;  
      Myseries.DataSource   :=   mydatamodule.CurveAQ;  
      Myseries.XLabelsSource   :=   '监测时间';  
      Myseries.YValues.ValueSource   :=   '计算值';  
      MySeries.Active   :=   true;  
  end;  
  调用:  
   
    begin  
          for   i   :=1   to   sencombo.Items.Count-1   do  
          begin  
          //sql   search   first.   and   draw   lines.  
              str   :=   'select   *   from   table   where   A   =   '''+sencombo.Items.Strings   [i]+''''+'and   Time   <   #2004-3-29#';  
              with     mydatamodule,CurveAQ   do   begin  
                  Close;  
                  SQL.Clear;  
                  SQL.add(str);  
                  Active   :=   true;  
              end;  
              addline;  
          end;  
      end  
 


查看回复
关于我们 | 网站地图 | 广告刊登 | 友情链接
Copyright ©2008 - 2010  Delphi2007.net  ,All Rights Reserved  粤ICP备09038647号
业务联系:allceoad#gmail.com QQ:20008835 最佳分辨率 1024×768