View Single Post
  #3   Report Post  
Scott P
 
Posts: n/a
Default Height (in points) of data point in chart above x-axis

Thank you for your reply and suggestion, Jon. I am trying to calculate the
aspect ratio of a chart in a Chart worksheet using the InsideWidth property
as the width of the chart and I would like to use the distance between the
max and min y-values in the series being charted as the height of the chart.

Are you aware of any way to determine the "height" of a data point in a
series above/below the x-axis given the y-value of that data point, as
measured in points? Thank you again.

"Jon Peltier" wrote:

Scott -

What are you trying to do? It may not be necessary to determine the
number of points to get the effect you want. There might be a native
feature you haven't yet discovered, or perhaps you need a trick that
someone else has already worked out.

But if you need the number of points, you can probably use some of the
code on the following web page to get started. The page shows ways to
use drawing objects to embellish a chart in ways that native chart
elements cannot be coerced to do.

http://peltiertech.com/Excel/Charts/VBAdraw.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


Scott P wrote:

Hi,

Is it possible using VBA to determine the height of a given data point in a
Chart worksheet in Excel above the x-axis in terms of points? I can use the
InsideHeight property in VBA to get the height of the plot area in points,
but I am really interested in determining the number of points above the
x-axis a data point sits.

Thank you in advance for any assistance with this matter.