How to get ZoomRect of "drag" zoom box at run-time

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Wiebe
Newbie
Newbie
Posts: 26
Joined: Fri Nov 15, 2002 12:00 am
Location: Middelburg
Contact:

How to get ZoomRect of "drag" zoom box at run-time

Post by Wiebe » Wed Jun 16, 2004 8:46 am

BCB6 + TeeChart V6Pro.

I want to "rezoom(in)" the chart again to the (previous) area of the zoom box that was manually drawn at run-time by dragging the left mouse button.
How can I get the coords of the zoom box?

Wiebe
Newbie
Newbie
Posts: 26
Joined: Fri Nov 15, 2002 12:00 am
Location: Middelburg
Contact:

How to get ZoomRect of "drag" zoom box at run-time

Post by Wiebe » Wed Jun 16, 2004 6:21 pm

Never mind. I found a solution in the meantime:
1. Save, prior to redrawing the Chart:
Chart->LeftAxis->Minimum, Chart->LeftAxis->Maximum,
Chart->BottomAxis->Minimum and Chart->BottomAxis->Maximum
2. After redrawing the Chart:
Make a TRect with Series->CalcXPosValue() and
Series->CalcYPosValue() using the values as saved in step1.
3. Do a Chart->ZoomRect with the TRect from step2.

Post Reply