Determining Chart Top at different zoom levels.

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Artimus
Newbie
Newbie
Posts: 18
Joined: Fri Oct 22, 2004 4:00 am

Determining Chart Top at different zoom levels.

Post by Artimus » Mon May 01, 2006 8:21 pm

I am trying to find a way to determine where the top of the chart starts, when you are at different zoom levels. For example, I have a chart and I change the zoomfactor to 60 and now I want to set the vertOffset so that the top of the chart is at the top of the window. At zoom 100, the top is at 0, but at say zoom 60 the top is at -79.
Somehow the scrollbar knows where the top is, because when you scroll down and let go, it redoes the scrollbar so you can't scroll past the top where you were before.

I figured there was some simple logic as to the charts positioning with the ".totalBounds" such as the center is always in the same location, or the top left would always stay at the same coordinates but I can't figure it out.

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

Post by Pep » Mon May 15, 2006 8:54 am

Hi,

I'm sorry but I'm not sure what are you trying to accomplish, nor what you're trying to get.
You could get the bounds of the Chart Rect accessing to the ChartRect properties :

Chart1.ChartRect.Left
Chart1.ChartRect.Top

Post Reply