ZedGraph 缩放和调整大小
当我绘制图形、放大和缩小并重新绘制图形时,图形的位置不会改变。
我想要做的是,每当重新绘制数据时,视图都会更改以查看所有图形数据。如果您在重绘之前放大或缩小,这似乎会被禁用。
谢谢!
When I draw a graph, and zoom in and out of it, and redraw it, the location of the graph doesn't change.
What I want to be able to do is have the view change to see all of the graphed data whenever the data is redrawn. This seems to be disabled if you zoom in or out before redrawing.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将控件的属性
.IsZoomOnMouseCenter
设置为 true:此外,您可能希望更改水平和/或垂直缩放的设置,以防您希望图表仅沿一个方向缩放(拉伸)轴:
Set the property
.IsZoomOnMouseCenter
to true for the control:Also you may want to change the settings for horizontal and/or vertical zoom, in case you want to allow the graph to only zoom (stretch) along one axis:
使用 Zedgraph 方法:
// 将比例范围恢复为所有缩放和平移操作之前的值
zg1.ZoomOutAll(GraphPane);
Use a Zedgraph method:
// Restores the scale ranges to the values before all zoom and pan operations
zg1.ZoomOutAll(GraphPane);