最近在DEMO中使用Teechart出现的问题及解决方案总结

来源:互联网 发布:淘宝收货货款冻结15天 编辑:程序博客网 时间:2024/04/29 21:57

1. Teechart数据全为0的时候,坐标值现在在图表中间的问题

解决方法:

     Chart1.LeftAxis.Automatic:=false;
     Chart1.BottomAxis.Automatic:=false;
     Chart1.LeftAxis.Maximum:=5;
     Chart1.BottomAxis.Maximum:=3;  

原理:给与一个初始值。

 

2. Teechart根据给定的数值自适应的问题

解决方法:

  Chart1.LeftAxis.Automatic:=true;
  Chart1.BottomAxis.Automatic:=true;

 

1和2进行组合 可以解决很多数据布局问题。

 

3.Teechart禁止右键拖动

解决方法:

  设置TeeChart的AllowPanning属性为Pmnone,即不能往任何方向拖动,其他三个属性为:pmBoth,pmHorizontal,pmVertical

依次为可以向两边(上下)拖动,水平拖动,垂直拖动。

 

4.Teechart禁止放大

解决方法;

Zoom的allow属性值为false

原创粉丝点击