F
Frank
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?
(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?