We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Undo Zooming

Hi,

I am using the ZoomType.Selection and ZoomType.MouseWheelScrolling for zooming in on a chart. But when I want to zoom out and click on the buttons visible on both the toolbars along X and Y axes, it does not zoom out the same amount. For example, if the current visible X range is 10 to 200 and I zoom in to 50 to 70, when I zoom out, it does not go directly to 10 to 200. It takes two/three attempts to go back to the original range.

Could you please tell me how I can zoom out the same amount?

Thank you.
Regards,
Swetaketu

3 Replies

DD Dharanidharan Dharmasivam Syncfusion Team December 2, 2016 09:25 AM UTC

Hi Swetaketu, 

Thanks for using Syncfusion product. 
We have analyzed your query. In general, in one click of zoom out button, chart will zoom out with zoom factor of 0.2f. On zoom out, chart will not maintain the same state and also chart will not retain the previous state, current state will be changed with zoom factor of 0.2, this is the current behavior of chart. If you want to reset the chart zoomed to position to initial state, you can use ResetOnDoubleClick property. Kindly find the code snippet below, 
 
Windows Forms: 

this.chart.ResetOnDoubleClick = true; 


We have created sample for your reference. Kindly find the sample from below location, 
  
We would like to know more details on your requirement (behavior for zoom in and zoom out), so that we can provide solution sooner. 

Thanks, 
Dharani. 



SM Swetaketu Majumder December 2, 2016 08:54 PM UTC

Hi Dharani,

Thank you for the response. I have seen this option to enable "reset on double click" but I am afraid it does not solve my problem. This option resets the zoom completely. What I need is to go back from the current zoom state to the last zoom state. 

For example, my complete X-Axis visible range is 0 - 100. I zoom in to 10 - 80 and again to 50 - 70. Now, I want to go back to the last zoomed state i.e. 10 - 80. Double click will take me back to 0 - 100 which is not what I want.

Thanks and Regards,
Swetaketu


DD Dharanidharan Dharmasivam Syncfusion Team December 6, 2016 07:36 AM UTC

Hi Swetaketu, 
  
Thanks for your update. 
  
We have analyzed your query. As of now your requirement can’t be achieved, since zooming behavior is different from your scenario. So we have logged improvement task and for better follow up we have created branch incident (#168656). Kindly follow up with incident(#168656) for more information on the improvement task. 
  
Kindly revert us, if you have concern on this. 
  
Thanks, 
Dharani. 


Loader.
Up arrow icon