如何使用数据可视化图表控件缩放图表.. [英] how to zoom chart using datavisualization chart control..
本文介绍了如何使用数据可视化图表控件缩放图表..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尊敬的先生,
i一直在我的 VB.NET windows应用程序中使用图表使用 DataVisualization ..
i希望使用键盘上的特定键来缩放此图表...
i我正在使用以下代码..但我想要垂直缩放..以下代码不显示正确的结果..
Respected sir,
i have been using charting in my VB.NET windows application using DataVisualization..
i want to zoom this chart using specific keys on keyboard...
i am using following code..but i want vertical zooming too..and following code does not show the proper result..
.ChartAreas(0).AxisX.ScaleView.Zoomable = True
.ChartAreas(0).AxisY.ScaleView.Zoomable = True
.ChartAreas(0).CursorX.AutoScroll = True
.ChartAreas(0).CursorY.AutoScroll = True
以上代码只进行水平缩放而不是垂直缩放..
所以请帮助我。
谢谢你,
above code only does horizontal zooming not vertical zooming..
so please help me.
Thank you,
推荐答案
这对我有用:
Chart1.ChartAreas(0).CursorX.IsUserSelectionEnabled = True Chart1.ChartAreas(0).CursorY.IsUserSelectionEnabled = True
Chart1.ChartAreas(0).AxisX.ScaleView.Zoomable = True
Chart1.ChartAreas(0).AxisY .ScaleView.Zoomable = True
Chart1.ChartAreas(0).CursorX.AutoScroll = True
Chart1.ChartAreas(0).CursorY.AutoScroll = True
代码显然允许使用鼠标选择图形的特定区域,并在两个轴上放大。
This is what worked for me:
Chart1.ChartAreas(0).CursorX.IsUserSelectionEnabled = True Chart1.ChartAreas(0).CursorY.IsUserSelectionEnabled = True
Chart1.ChartAreas(0).AxisX.ScaleView.Zoomable = True
Chart1.ChartAreas(0).AxisY.ScaleView.Zoomable = True
Chart1.ChartAreas(0).CursorX.AutoScroll = True
Chart1.ChartAreas(0).CursorY.AutoScroll = True
The code apparently allowed to use a mouse to select a specific region of the graph and it zoomed into it on both axes.
这篇关于如何使用数据可视化图表控件缩放图表..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文