Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Scott P
 
Posts: n/a
Default Height (in points) of data point in chart above x-axis

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.
  #2   Report Post  
Jon Peltier
 
Posts: n/a
Default Height (in points) of data point in chart above x-axis

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.

  #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.


  #4   Report Post  
Jon Peltier
 
Posts: n/a
Default Height (in points) of data point in chart above x-axis

It's all just 8th grade algebra, so go find an 8th grader.

Aspect ratio is just InsideWidth/InsideHeight.

Distance above axis, in points, get the Y value of the point, subtract the "X Axis
Crosses At" value, divide by the Y axis Maximum Scale - Minimum Scale, multiply by
Inside Height.

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

Scott P wrote:

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.



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

Thank you for your follow-up, Jon. I am familiar with the algebra/geometry
at work here. Perhaps I should have been more specific in my post -- I am
really just looking for a Property related to a Chart that returns the
vertical distance of a point to the x-axis.

I could not find such a Property so I will use the general approach as
outlined below. Thanks again.

"Jon Peltier" wrote:

It's all just 8th grade algebra, so go find an 8th grader.

Aspect ratio is just InsideWidth/InsideHeight.

Distance above axis, in points, get the Y value of the point, subtract the "X Axis
Crosses At" value, divide by the Y axis Maximum Scale - Minimum Scale, multiply by
Inside Height.

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

Scott P wrote:

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.





  #6   Report Post  
Jon Peltier
 
Posts: n/a
Default Height (in points) of data point in chart above x-axis

Scott -

You couldn't find the property you were looking for, because it doesn't exist. Hence
the need for roundabout calculations.

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

Scott P wrote:

Thank you for your follow-up, Jon. I am familiar with the algebra/geometry
at work here. Perhaps I should have been more specific in my post -- I am
really just looking for a Property related to a Chart that returns the
vertical distance of a point to the x-axis.

I could not find such a Property so I will use the general approach as
outlined below. Thanks again.

"Jon Peltier" wrote:


It's all just 8th grade algebra, so go find an 8th grader.

Aspect ratio is just InsideWidth/InsideHeight.

Distance above axis, in points, get the Y value of the point, subtract the "X Axis
Crosses At" value, divide by the Y axis Maximum Scale - Minimum Scale, multiply by
Inside Height.

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

Scott P wrote:


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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stock High-Low-Close Chart Tim Charts and Charting in Excel 7 August 24th 07 01:02 PM
In a 2 Y-Axis chart, how do I assign data ranges to an axis? Claire4Golf Charts and Charting in Excel 1 September 28th 05 07:52 PM
How to remove a data point in a chart? Vicky Charts and Charting in Excel 6 July 15th 05 05:27 PM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
Data Points in Scatter Chart CWILSON Charts and Charting in Excel 2 January 25th 05 05:41 PM


All times are GMT +1. The time now is 02:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"