Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I insert a hyperlink into a chart element? | Charts and Charting in Excel | |||
Excel 2003: How to nudge a chart element or shape on a chart? | Charts and Charting in Excel | |||
X,Y coordinates on chart | Charts and Charting in Excel | |||
Analyzing X,Y,Z coordinates of a chart | Excel Discussion (Misc queries) |