LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.charting
external usenet poster
 
Posts: 14
Default Unwanted chart plot area resized when .Axes(xlValue).MinimumScale = "-0.1"

I like big graphs and have written the following code

(maximum1 and minimum1 are the max and min in the charted source)

major_unit = .Axes(xlValue).MajorUnit
If Application.RoundUp((.Axes(xlValue).MaximumScale - maximum1) /
major_unit, 0) 1 Then _
.Axes(xlValue).MaximumScale = .Axes(xlValue).MaximumScale -
major_unit * (Application.RoundUp((.Axes(xlValue).MaximumScale -
maximum1) / major_unit, 0) - 1)
If Application.RoundUp((minimum1 - .Axes(xlValue).MinimumScale) /
major_unit, 0) 1 Then _
.Axes(xlValue).MinimumScale = .Axes(xlValue).MinimumScale +
major_unit * (Application.RoundUp((minimum1
- .Axes(xlValue).MinimumScale) / major_unit, 0) - 1)

It works wonderfully except when after the routine,
if .Axes(xlValue).MinimumScale = "-0.1", it shifts the y axis to the
right and reduces the plot area.

So I added the following line of code:

If .Axes(xlValue).MinimumScale = "-0.1"
Then .Axes(xlValue).MinimumScale = "-0.1" and it works.

This only happens with -0.1

I’ve uploaded images of what it looks like:

http://www.gingins.info/2.gif and http://www.gingins.info/1.gif

Anyone knows about this?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I "align middle" the legend and plot area? StonyCreeker Charts and Charting in Excel 2 April 23rd 23 09:05 AM
Chart.Axes().MinimumScale Not WORKING ddm Charts and Charting in Excel 5 February 21st 08 08:28 AM
Excel VBA Charting at Axes("xlValue") [email protected] Excel Programming 2 May 8th 07 01:55 AM
modifying the area plot to a "top-hat" instead of a "saw-tooth" Curious27 Charts and Charting in Excel 9 June 16th 06 03:56 AM
How to apply the custom chart type: "Line - Column on 2 Axes" talrs Excel Programming 0 April 20th 06 09:23 AM


All times are GMT +1. The time now is 03:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"