Zooming and Scrolling

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

Zooming and Scrolling

Post by mc » Tue Aug 09, 2005 2:05 pm

How can I know when the chart is being zoomed by dragging the mouse? The
"OnZoom" chart event doesn't seem to do it.

The help doc says that UndoZoom restores any runtime scrolling. However, in
my bar chart scrolling actions are not affected when
UndoZoom is issued. If UndoZoom does not apply in this case, what does
please? It seems to work if I reset the axes to "automatic". Is this the way?

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Aug 10, 2005 1:38 pm

Hi,
How can I know when the chart is being zoomed by dragging the mouse? The "OnZoom" chart event doesn't seem to do it.
The OnZoom event is fired once you release the button of the mouse. In case you want to do something when the mouse button has been pushed and drag you will have to use the OnMouseDown and OnMouseMove events.
The help doc says that UndoZoom restores any runtime scrolling. However, in my bar chart scrolling actions are not affected when
UndoZoom is issued. If UndoZoom does not apply in this case, what does
please? It seems to work if I reset the axes to "automatic". Is this the way?
Strange, it works fine here simply using :

Code: Select all

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Chart1.UndoZoom;
end;
having scrolled and zoomed the Chart.
(using TeeChart Pro v7.04). How can I reprouduce the problem ?

mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

Zooming and Scrolling

Post by mc » Thu Aug 11, 2005 1:30 am

I have an example. How can I send it to you?

By the way, 2 things that may or may not matter:
1) I do the scrolling with the Axis SetMinMax method
2) I have a custom axis.

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Aug 11, 2005 6:41 am

Hi,
By the way, 2 things that may or may not matter:
1) I do the scrolling with the Axis SetMinMax method
2) I have a custom axis.
In this case, have you take a look on our FAQ : here ?

If you still having problems you can send me a sample app. directly to pep@steema.com

mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

Zooming and Scrolling

Post by mc » Thu Aug 11, 2005 1:57 pm

Please forgive me for being dense, but it seemed to me that chart.zoom/unzoom was working fine with custom axes ( I have Pro v 7.04 ). Am I seeing things?

My problem was with scrolling which, thanks to an old post I found in the newsgroup, I was able to "undo" by setting the axes to "automatic".

The example you directed me to in FAQ suggests that chart.zoom/unzoom don't work with custom axes. Also, the example adjusts the vertical axis only. Would one normally also adjust the horizontal axis?

mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

Zooming and Scrolling

Post by mc » Thu Aug 11, 2005 2:05 pm

The example in FAQ, uses chart.izoom.x1, etc. Where is this izoom property defined?

Thank you

Post Reply