+ Reply to Thread
Results 1 to 1 of 1

Returning Coordinates of Items in a Chart

  1. #1
    Registered User
    Join Date
    11-02-2011
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010
    Posts
    52

    Returning Coordinates of Items in a Chart

    Project: I have multiple charts with lots of data labels... The issue is when I simply add a leading line to connect the data label to the point on the line chart the leading line extends from the right side of the label which is creating overlap issues and looks bad. I need the line to come out of the bottom of every data label.

    The solution I found to this was to change the data label shape to a "call out" this allows me to manually control the placement of the leading line.

    The issue: I have a fairly large macro that basically creates a bunch of charts based on different data using loops. The issue is I am having trouble telling the vba where to place the lines from my data labels on the charts. I have no issues telling it where to position the data label itself just the line.

    ActiveChart.FullSeriesCollection(1).Points(1).DataLabel.Select 'This is the data label
    Selection.Format.Adjustments.Item(1) =
    Selection.Format.Adjustments.Item(2) =
    Selection.Format.Adjustments.Item(3) =
    Selection.Format.Adjustments.Item(4) =

    1,2,3,4 seem to be the x,y coordinates of the end points I just cant figure out how to return their coordinates.


    If anyone can provide a macro that returns the coordinates of these points I would be forever grateful. I can then use those coordinates to tell the vba to position the line to those positions (currently the vba moves the line which is why I need to know the coordinates to move it back)

    Attached is a sample spreadsheet.

    Thanks.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Scatter chart to ploy x,y coordinates
    By dpsersimon in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-27-2013, 01:34 AM
  2. Pointer coordinates on chart
    By Ralem in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-14-2010, 10:04 AM
  3. X,Y coordinates on chart
    By lgarcia3 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-17-2006, 07:46 AM
  4. [SOLVED] A question regarding coordinates of points within a chart
    By Wazooli in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-15-2005, 01:06 AM
  5. Analyzing X,Y,Z coordinates of a chart
    By jenlo in forum Excel General
    Replies: 1
    Last Post: 01-31-2005, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1