TAChart: extent limitation in zooming tools
Original Reporter info from Mantis: Marcin Wiazowski
-
Reporter name:
Original Reporter info from Mantis: Marcin Wiazowski
- Reporter name:
Description:
I have a strange feeling, that I missed something obvious - but I couldn't find a way to limit chart's extent, when using zooming tools.
To limit chart's extent, we can use Chart.Extent property - which works under normal circumstances. We can also use panning tool's LimitToExtent property.
But it seems, that no functionality allows to do same thing for zooming tools; zooming tools effectively only use Chart.ExtentSizeLimit property, which doesn't allow to limit chart extent's bounds.
So I'm attaching experiment.diff, which partially implements LimitToExtent functionality also in zooming tools. The idea is: if we have chart's full extent with X range [0..100], and the user selects zooming area X = [90..120], zooming tool should behave just like for selected area X = [90..100].
I'm not sure if the attached patch works properly with animated zoom; also some additional code is needed to handle RatioLimit functionality.