Tchart的横纵坐标最大和最小值如何用语句设置Tchart的横纵坐标最大和最小值

来源:互联网 发布:重庆大学网络教学平台 编辑:程序博客网 时间:2024/05/22 17:18

       在实际的项目开发过程中,我们经常要对图标的X轴和Y轴的最大、最小值 及间隔 进行设定方便我们图标的显示;以下的代码则实现此功能,希望以下代码对你有所帮助:

//设定X轴

Chart1->BottomAxis->Automatic= false ;
Chart1->BottomAxis->AutomaticMaximum = false ;
Chart1->BottomAxis->AutomaticMinimum = false ;
Chart1->BottomAxis->Maximum =20000.00 ;
Chart1->BottomAxis->Increment = 2000.00 ;//刻度

//设定Y轴 左边
Chart1->LeftAxis->Automatic = false ;
Chart1->LeftAxis->AutomaticMaximum = false ;
Chart1->LeftAxis->AutomaticMinimum = false ;
Chart1->LeftAxis->Maximum = 32767 ;
Chart1->LeftAxis->Minimum = -32768;
Chart1->LeftAxis->Increment = 6553 ;

//设定Y轴 右边
Chart1->RightAxis->Automatic = false ;
Chart1->RightAxis->AutomaticMaximum = false ;
Chart1->RightAxis->AutomaticMinimum = false ;
Chart1->RightAxis->Maximum = 32767 ;
Chart1->RightAxis->Minimum = -32768;
Chart1->RightAxis->Increment = 6553 ;

0 0
原创粉丝点击