View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jdavis jdavis is offline
external usenet poster
 
Posts: 1
Default Excel Graph Click Problem

I have created a chart / sheet combination that allows a user to zoom
in and out on any set of data. This is useful, as normally, at least
10,000 data points are present and at least 3 series. The user can
presently input direct values for the min/max x and min/max y values
desired, and the chart zooms to that size.

This is, however, not the most convenient way to use this. I would be
infinitely nicer if the user could just click on two places within the
plotArea (not selecting points, just clicking in the plotArea) to
define those min/max boundaries, then shift-click or something to zoom
back out to full scale. If I could get the coordinates relative to the
top left of the plotArea, it would be easy to find the desired zoom
scale.

The problem is, the top and left (nor the height and width) of the
plotArea object seems to have nothing to do with the coordinates
received from the "_mouseUp" event nor the API "getCursorPos"
coordinates received. The window object top / left also seems to be
rather irrelevant. What I really want is just the top, left, height,
and width in pixels of the plotArea object relative to the top / left
of the screen. I would, of course, be assuming the whole chart is
visible at one time, but that way I could adjust the coordinates of the
click relative to the top / left of the plotArea.

I am using Excel 2002 and am very familiar with coding in Excel
normally, but it seems I am in a quandary. Can anyone help?

Jonathan Davis