Page 1 of 1
Changing Zoom Behaviour
Posted: Mon May 11, 2009 3:05 pm
by 15052659
Any know of a simple approach to allowing the user to select a zoom rectangle going in any direction? The default behaviour of forcing top-left to bottom-right is causing me some problems.
TIA
Posted: Mon May 11, 2009 3:11 pm
by narcis
Hello,
Just sent you an example by e-mail.
Posted: Tue May 12, 2009 2:32 pm
by 15052659
narcis wrote:Hello,
Just sent you an example by e-mail.
The VB example was fine, but my problem is related to the structure of my app. We have an abstraction layer between and MDI view container and the TChart control. This abstraction layer is meant to isolate the view from the underlying chart object. Using event Sinks in the View breaks this design. I'm using C++ in VS2008 so VB isn't really of much help in this area.
Is there a way, that anyone knows of, to trap these events at the TChart Level?
TIA
Posted: Tue May 19, 2009 2:24 pm
by Marc
Hello,
Re.
Is there a way, that anyone knows of, to trap these events at the TChart Level?
TeeChart does trap mouse events to actuate the zoom/unzoom. Zoom and Unzoom trigger their own events where you may intervene. Zoom direction, the mousedrag-direction, may be changed via Chart properties.
Re.
abstraction layer is meant to isolate the view from the underlying chart object
If you wish to zoom/unzoom but not by mousedragging directly on the Chart (ie. you don't wish TeeChart to capture the zoom mousevent requests) then zoom can be disabled and you can zoom manually by code, interpreting your own means of sending the information simply by running the Axes SetMinMax methods and passing the respective Axis limits.
Please clarify if I've missed what you require.
Regards,
Marc Meumann
Posted: Wed May 20, 2009 8:01 am
by 15052659
Re.
Is there a way, that anyone knows of, to trap these events at the TChart Level?
TeeChart does trap mouse events to actuate the zoom/unzoom. Zoom and Unzoom trigger their own events where you may intervene. Zoom direction, the mousedrag-direction, may be changed via Chart properties.
Thanks. This is exactly what I was looking for. All I needed was to set the UpLeftZooms property on the Zoom Interface to true.
Thanks for the pointer.