Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    comments on charts (2000)

    I have there charts that get generated via a macro and I need comments to show up on them in certain places.
    Here is the thing, I need the comments to attach themselves to certain point but that requires knowing the exact coordiantes of the point in quesation. I wrote a macro the figures out an approximate location for the point using the upperleft part of the plot area and the max/min values relative to the value of the piont to get close but is is possible to know the exact location of any point on the graph. It is a scatter plot graph

    Thanks

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: comments on charts (2000)

    Instead of using the properties of the plot area, use the properties of the axes. For example, for the X axis: (max-min)/length gives you x value per pixel. For the point in question, you know the X value. Calculate how many pixels you need, from the minimum, to place the comment on that point. Add that number of pixels to the Left property (position in pixels) of the axis.
    Do the same for the Y axis, however, you will have to substitute height for width, and you will have to calculate position down from the Top instead of right of Left. I used this approach to draw a window around data on a chart, based on some calculations in a sheet. I hope this is helpful, generic as it is; I think you have the right approach, but use the axis as the reference, not the plot area.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •