Page 1 of 1

Determining Chart Top at different zoom levels.

Posted: Mon May 01, 2006 8:21 pm
by 9339645
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.

Posted: Mon May 15, 2006 8:54 am
by Pep
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