Results 1 to 4 of 4

How to draw a rectangle to scale on an excel chart

This is a discussion on How to draw a rectangle to scale on an excel chart within the Excel Questions forums, part of the Question Forums category; First time post - please be gentle. I have responsibility for a VB6 program (and Excel 2007) that creates an ...

  1. #1
    New Member
    Join Date
    Jul 2011
    Posts
    2

    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
    3,781

    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 the Peltier Tech Chart Utility

  3. #3
    New Member
    Join Date
    Jul 2011
    Posts
    2

    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
    3,781

    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 the Peltier Tech Chart Utility

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