Microsoft Office Tutorials and References
In Depth Information
ADJUST XY CHART SCALING FOR CORRECT ASPECT RATIO
Figure 88. You start with an oval and a rectangle.
Figure 89. You want a circle and a square, as shown here.
Solution: The following code works on both embedded charts and chart sheets.
Ensure that the chart is selected or that the chart sheet is activated and then
run the following code:
Dim Cht As Chart, Ser As Series, AxX As Axis, AxY As Axis
Set Cht = ActiveChart
‘Determine MinX, MinY, MaxX, MaxY across all series
For i = 1 To Cht.SeriesCollection.Count