Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting the coordinates/ size of a bar chart element

I wonder if anyone can help with this

I want to get the xy (ref the screen not the chart) coordintates and the
size of a bar chart element when I click on it.
I am using the mousedown event to get the element and can get at the element
itself, its data etc etc but I can't seem to find a way to get to indo about
its size and position on the screen (eg Top, Left etc).

Is this possible ?

Steve


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Getting the coordinates/ size of a bar chart element

Hey Steve -

When you get your XY, what are you going to do with it? There may be an
easier way to go about it.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Steve wrote:
I wonder if anyone can help with this

I want to get the xy (ref the screen not the chart) coordintates and the
size of a bar chart element when I click on it.
I am using the mousedown event to get the element and can get at the element
itself, its data etc etc but I can't seem to find a way to get to indo about
its size and position on the screen (eg Top, Left etc).

Is this possible ?

Steve



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Getting the coordinates/ size of a bar chart element

Jon

I have a drag and drop routine for individual elements of a stacked bar
chart - so that I can drag them (and the driving data) to different
places (ie a different order in the stacked bar or to a different
stack). One problem I have is that I want to create a rectangle exactly
the same size and position as the element selected so that this will be
visible during the drag operation.

I have now managed to achieve this by deducing the xy coords and the
size from the inside plot area property, the max point of the axis and
the cross over point, similarly for the category axis I have managed to
deduce what I want from the axis size and the parameter for bar spacing.
I can now create a rectangle with the mouse down event and can drag this
rectangle - driving the dotted line rectangle to be shown.

However, as always, I find a way to achieve what I want but not
necessarily the best way so if you know of anything I can do that is
better, quicker tidier I would appreciate your feedback.

Steve



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Getting the coordinates/ size of a bar chart element

Steve -

Sounds like you basically have done what I would have suggested. For
some things, there really isn't a "best way".

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Steve Allanson wrote:
Jon

I have a drag and drop routine for individual elements of a stacked bar
chart - so that I can drag them (and the driving data) to different
places (ie a different order in the stacked bar or to a different
stack). One problem I have is that I want to create a rectangle exactly
the same size and position as the element selected so that this will be
visible during the drag operation.

I have now managed to achieve this by deducing the xy coords and the
size from the inside plot area property, the max point of the axis and
the cross over point, similarly for the category axis I have managed to
deduce what I want from the axis size and the parameter for bar spacing.
I can now create a rectangle with the mouse down event and can drag this
rectangle - driving the dotted line rectangle to be shown.

However, as always, I find a way to achieve what I want but not
necessarily the best way so if you know of anything I can do that is
better, quicker tidier I would appreciate your feedback.

Steve



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Getting the coordinates/ size of a bar chart element

Ok

Thanks anyway Jon

Steve



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
How do I insert a hyperlink into a chart element? JS Charts and Charting in Excel 1 June 5th 10 08:12 PM
Excel 2003: How to nudge a chart element or shape on a chart? Ted M H Charts and Charting in Excel 5 June 30th 08 07:08 PM
X,Y coordinates on chart lgarcia3 Charts and Charting in Excel 2 February 17th 06 11:46 AM
Analyzing X,Y,Z coordinates of a chart jenlo Excel Discussion (Misc queries) 1 January 31st 05 01:05 PM


All times are GMT +1. The time now is 05:57 AM.

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"