Chart组件上让X轴循环滚动 怎么使Chart组件上让X轴的刻度运动。 我现在循环一组数据在Chart上,但X轴越来越浓密。 怎么使它不停的循环呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var Form1: TForm1; num:integer; //用于设置显示范围implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);beginchart1.BottomAxis.Minimum :=0; //设定x轴显示最小值chart1.BottomAxis.Maximum :=200; //x轴显示最大值chart1.BottomAxis.Automatic :=false; //*一定要设为FALSE;timer1.enable:=false; end;procedure TForm1.Button1Click(Sender: TObject);begintimer1.Enabled :=true;end;procedure TForm1.Timer1Timer(Sender: TObject);begin series1.Add(random(100)); inc(num); if num>200 then //此处就是循环部分了 begin chart1.BottomAxis.Minimum :=chart1.BottomAxis.Maximum -200; //更改x轴最小值 chart1.BottomAxis.Maximum:=num; //更改X轴最大值 end;end; C:\Program Files\Borland\Delphi7\Demos\TeeChart zhouzuoji(乌江恨)他才25岁,就死了!哎 DIPHI与SQL连接的安全问题 高手指教:怎样用DELPHI自带的MP控件播放DVD文件啊? 这几行VB代码如何编写为delphi 高手请进哈。高分相送! 在线等待-100分 问几个很菜的问题(每个25分啊) 高分相求:按照字段内部分内容排序 如何做一个像foxmail一样可以导入outlook邮件,导入到文件或数据库都行. 如何在delphi中使用access数据库? 急!急!急!急!急! RemObjects Pascal Script应用 delphi怎么做数据库
Form1: TForm1;
num:integer; //用于设置显示范围
implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
chart1.BottomAxis.Minimum :=0; //设定x轴显示最小值
chart1.BottomAxis.Maximum :=200; //x轴显示最大值
chart1.BottomAxis.Automatic :=false; //*一定要设为FALSE;
timer1.enable:=false;
end;procedure TForm1.Button1Click(Sender: TObject);
begin
timer1.Enabled :=true;
end;procedure TForm1.Timer1Timer(Sender: TObject);
begin
series1.Add(random(100));
inc(num);
if num>200 then //此处就是循环部分了
begin
chart1.BottomAxis.Minimum :=chart1.BottomAxis.Maximum -200; //更改x轴最小值
chart1.BottomAxis.Maximum:=num; //更改X轴最大值
end;
end;