+ Reply to Thread
Results 1 to 4 of 4

Lock dimensions of plot area of dynamic chart

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    13

    Lock dimensions of plot area of dynamic chart

    Hello,

    I'm having a dynamic chart with an equally dynamic Y-axis. The data which I'm plotting are very much different values. As a result, the plot area keeps changing in its width according to the axes labels: Wider when the labels are smaller and more narrow when the labels are long.

    Narrow_plot_area.PNGWide_plot_area.PNG

    Is there a way to lock the plot area or the X-axis from changing? The charts keeps changing its dimensions when a user changes the metrics.

    Thank you.

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

    Re: Lock dimensions of plot area of dynamic chart

    You can not lock the plot area position.

    You would need to use code to size and position plotarea. This is complicated by the fact that the plotarea.insideleft value is read-only.
    You need to modify the .Left property of the plotarea and monitor the InsideLeft property until it is in, or close to, the required position.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    14,351

    Re: Lock dimensions of plot area of dynamic chart

    Since the plot area resizes based on the length of the y axis label, you might try adjusting the number format of the axis labels to be a constant width.

    I know everybody but us scientific/engineering folks despise scientific notation, but it is a good way to fit any number into a constant width. So a format code of 0.00E+0 would display number to 3 sig figs and the width of the display would never change (unless your number was greater than 1E10 or smaller than 1E-10).

    A ? in the format code can be used to reserve spaces and keep a number field a constant width. So a format code of ?????0.00 will reserve the "leading spaces" and try to keep the number field a constant width.

  4. #4
    Registered User
    Join Date
    08-21-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Lock dimensions of plot area of dynamic chart

    Thank you both for your replies.

    MrShorty, I tried the format code ?????0.00 and it works very well for me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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