ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Data point coordinate offset in embedded chart (https://www.excelbanter.com/charts-charting-excel/227183-data-point-coordinate-offset-embedded-chart.html)

GeoBrooks

Data point coordinate offset in embedded chart
 
I've used the technique outlined at
http://peltiertech.com/WordPress/con...th-arrows-vba/ to
draw lines on an embedded chart in XL2007. But I've had to add 4 to the
calculated coordinates to make the lines connect to data points. This offset
seems to be independent of chart size.

Is there a chart property from which this offset can be derived? Or is this
just a "feature"?

George

Jon Peltier

Data point coordinate offset in embedded chart
 
I wrote that routine in Excel 2000, and it worked until 2003. Excel 2007
charts have slightly different characteristics, including changed margins
around the plot area and chart area. I think there were small offsets in the
earlier versions, so while Excel 2007 has different offsets, it isn't wrong,
just different. Someday I may revisit that code and allow for varying
margins based on Excel version.

- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - Training in Charting and Programming
http://peltiertech.com/Training/2009...00906ACNJ.html
_______


"GeoBrooks" wrote in message
...
I've used the technique outlined at
http://peltiertech.com/WordPress/con...th-arrows-vba/ to
draw lines on an embedded chart in XL2007. But I've had to add 4 to the
calculated coordinates to make the lines connect to data points. This
offset
seems to be independent of chart size.

Is there a chart property from which this offset can be derived? Or is
this
just a "feature"?

George




GeoBrooks

Data point coordinate offset in embedded chart
 
So I guess we can say that a specific chart property doesn't exist, other
than that if version = 2007, then offset = +4. I can live with that.

Thanks.

George

btw, I'm not connecting data points, just drawing velocity vectors on an
animated projectile motion curve. But your solution was exactly what I
needed.

"Jon Peltier" wrote:

I wrote that routine in Excel 2000, and it worked until 2003. Excel 2007
charts have slightly different characteristics, including changed margins
around the plot area and chart area. I think there were small offsets in the
earlier versions, so while Excel 2007 has different offsets, it isn't wrong,
just different. Someday I may revisit that code and allow for varying
margins based on Excel version.

- Jon
-------
Jon Peltier, Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
Advanced Excel Conference - Training in Charting and Programming
http://peltiertech.com/Training/2009...00906ACNJ.html
_______


"GeoBrooks" wrote in message
...
I've used the technique outlined at
http://peltiertech.com/WordPress/con...th-arrows-vba/ to
draw lines on an embedded chart in XL2007. But I've had to add 4 to the
calculated coordinates to make the lines connect to data points. This
offset
seems to be independent of chart size.

Is there a chart property from which this offset can be derived? Or is
this
just a "feature"?

George






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com