How to draw a rectangle to scale on an excel chart

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: How to draw a rectangle to scale on an excel chart

  1. #1
    New Member
    Join Date
    Jul 2011
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default How to draw a rectangle to scale on an excel chart

     
    First time post - please be gentle.

    I have responsibility for a VB6 program (and Excel 2007) that creates an excel stacked column chart that shows defects for a mile range. The mile range can be continuous oe noncontinuous and can have odd mile post numbers (like 6.28) out of the blue. The program is currently showing projects across the mile range as a horizontal rectangle that SHOULD start at the first milepost and end at the last milepost for the project but is not.

    For example, if the project is from mile post 56 to 75, the rectangle shows as starting at 46 and continuing to 63.

    I'm pretty sure that the problem lies in how the program calculates the units between the mileposts but don't know of a better way to do it. Currently, I use

    lUnit = (Charts(Charts.Count).PlotArea.Width) / (lNoOfMiles)

    Is there a better, more accurate value? I tried .MajorUnit but VB6 doesn't recognize it.

  2. #2
    MrExcel MVP
    Join Date
    May 2003
    Location
    USA
    Posts
    4,424
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: How to draw a rectangle to scale on an excel chart

    It would help to see the data.
    Jon Peltier
    Peltier Technical Services, Inc.
    Try Peltier Tech Charts for Excel

  3. #3
    New Member
    Join Date
    Jul 2011
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: How to draw a rectangle to scale on an excel chart

    Sorry, I can't. It contains proprietary data.

  4. #4
    MrExcel MVP
    Join Date
    May 2003
    Location
    USA
    Posts
    4,424
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: How to draw a rectangle to scale on an excel chart

      
    I don't mean the workbook. How about data which is typical of what you encounter. And describe this rectangle. Where is its top, bottom, left, and right edges?
    Jon Peltier
    Peltier Technical Services, Inc.
    Try Peltier Tech Charts for Excel

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com