how to preserve chart zoom/scroll state and restore it

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
BlueMonkey
Newbie
Newbie
Posts: 34
Joined: Tue Nov 04, 2008 12:00 am

how to preserve chart zoom/scroll state and restore it

Post by BlueMonkey » Thu Dec 04, 2008 5:48 pm

I am using Borland Delphi 2006 and TeeChart 8.1.

I would like to record the current zoom/scroll state of the chart and restore it later. I know how to get 3D state information, but not the 2D state information (i.e. View3DOptions. Elevation, Rotation, Zoom, HorizOffset, VertOffset).

For example, if the user scrolls by dragging the right mouse button or zooms by dragging the left mouse button, how do I obtain the resulting offset and zoom states? Are these axis attributes?

When I am ready to restore the chart to the saved state, what method do I use?

Thanks,
Kent

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Dec 05, 2008 9:42 am

Hi Kent,

Zoom and scroll "states" can be defined by axes scales. Every time you perform one of those operations you should save axes min. and max. values to an array in the OnZoom and OnScroll events and retrieve array values when restoring "states". For setting again array values use axis SetMinMax method.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply