Maximum zoom-in limit

Oystein Bjorke 6 years ago 0
This discussion was imported from CodePlex

wbidus wrote at 2014-07-10 14:21:

I am using dynamic zooming in my plot, but I want to make it more user-friendly.
I wanted to implement limits, so user cannot zoom-out too far and zoom-in too close.
Limiting zoom-out is quite simple - i just set absolutemin/absolutemax values, and it works.
As far as i know, there is no out-of-the-box feature that would work similarly but for zoom-in.
Actually, I am out of ideas - i tried disabling zooming after the length of axis was too short, but after this I am not able to zoom-out again (AxisChanged event is not called anymore).

Do You guys have any ideas how I can limit zooming-in?

objo wrote at 2014-07-10 15:07:

Should we add a "MinimumRange" property to the axes? With default value double.MinValue..

wbidus wrote at 2014-07-10 15:51:

Sounds promising!

Thank You, how could I miss it? It works exactly as it should :)

Slxe wrote at 2014-07-10 16:00:

Maximum range meaning between the visible min and max points? 'cause that sounds like a pretty decent way of limiting it (also as wbidus mentioned MinimumRange already exists =P). I've said this a few times already but it'd also be nice if the AxisChanged event had more information in it's event args (like factor or new screen points).

objo wrote at 2014-07-11 22:04:

Yes, it should be the minimum between minimum and maximum. Sorry, I forgot that it was already implemented. And default value should of course be 0...
@Slxe: I think we can start a new discussion/issue on changing the AxisChanged event data. I am a bit hesitant to exposing more data than what is absolutely needed :-)