开发者

Microsoft chart control zoom out and panning

开发者 https://www.devze.com 2023-03-24 15:05 出处:网络
I have been playing with Ms chart control zoom feature. One thing I have not been able to do is to do Zoom out. Although we can Zoom in, there开发者_高级运维 is not Zoom out feature. I could only rese

I have been playing with Ms chart control zoom feature. One thing I have not been able to do is to do Zoom out. Although we can Zoom in, there开发者_高级运维 is not Zoom out feature. I could only reset the zoom that is not what i am looking for. Any one here who has done Zoom out for MS hart controls?? Any suggestions. Also any pointers to how to implement panning for Ms charts?

Thanks


The zoom out is done one the axis scrollbar! Also there is nothing to stop you setting the zoom diagrammatically:

chart1.ChartAreas[0].AxisX.ScaleView.Zoom(-10, 110);
chart1.ChartAreas[0].AxisY.ScaleView.Zoom(-10, 20);

the values you enter there can be outside the min/max of the data.


I started to write a helper for MS Charts controls. It includes mouse based scrolling and a mousewheel zoom. It is very simple you can tweak it for your own needs very quickly. It does not use viewmin and viewmax and can zoom out as far as you wish.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号