+ Reply to Thread
Results 1 to 5 of 5

Adding shapes to an excel graph

  1. #1
    Registered User
    Join Date
    04-24-2014
    Location
    Vancouver,Canada
    MS-Off Ver
    Excel 2013
    Posts
    1

    Adding shapes to an excel graph

    How do I add shapes to an excel graph and have the shape keep its position and ratio on the graph if I have to re-size the graph?? I've used the "Insert" shapes function to draw the rectangle, but it wont stay on the graph or keep its position/ratio to the points on the graph... The picture in the attachment is what I would want to get it to look like even if I re-size the graph...

    Thank you!!
    Attached Images Attached Images

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Adding shapes to an excel graph

    Hi

    One, (and no doubt quite complex) way would be to write some VBA code that identified each time the graph changes where the points are and altered the Left/Top properties of the rectangles accordingly

    The better way, (and no doubt a bit of lateral thinking will identify the best approach) would be to add additional series, and perhaps use high/low bars or other inbuilt chart elements so that the 'rectangles' are in fact just another series of plots, but which are directly related to the original series'.

    Maybe you'll be in luck and Andy Pope will be along soon assuming he picks this up.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Adding shapes to an excel graph

    You will likely need VBA to alter the ratio when the chart changes size.

    In the attached, I've changed the "Marker Options" to image and inserted a rectangle. This might help get you started.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Adding shapes to an excel graph

    Here's a stacked column chart with the top and bottom portions transparent.

    The rectangle ratios will adjust with chart sizing.
    Attached Files Attached Files

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Adding shapes to an excel graph

    As Richard mentioned additional series drawing the lines is probably the best approach
    Cheers
    Andy
    www.andypope.info

+ 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] Adding Hyperlink to Shapes - Why wont this work ???
    By Alina1404 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2012, 03:18 AM
  2. Replies: 0
    Last Post: 03-25-2009, 11:19 AM
  3. Adding shapes to xy scatter charts
    By Richw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2005, 11:15 AM
  4. [SOLVED] How can i get more 3D shapes for Auto shapes in excel?
    By Ajey in forum Excel General
    Replies: 0
    Last Post: 03-03-2005, 06: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