Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.charting
|
|||
|
|||
![]()
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I "align middle" the legend and plot area? | Charts and Charting in Excel | |||
Chart.Axes().MinimumScale Not WORKING | Charts and Charting in Excel | |||
Excel VBA Charting at Axes("xlValue") | Excel Programming | |||
modifying the area plot to a "top-hat" instead of a "saw-tooth" | Charts and Charting in Excel | |||
How to apply the custom chart type: "Line - Column on 2 Axes" | Excel Programming |