Microsoft chart control zoom out and panning
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.
精彩评论