Hi, the Small Multiples give a good example where you want to align the plot area size between different charts:
When you remove the vertical or horizontal axis the size of the plot area changes. So in your nice example the width of Regions A&E is more narrow than the other regions and and the top row Regions A-D are higher than the lower row.
What would be the easiest way to align the plot area's width and height?
Thanks,
Matthias
Hi Matthias,
I would create two charts, one with the axis labels and one without. Then align the plot area manually by placing the chart without labels on top of the chart with (set the fill of the chart without labels to No Fill). Once you have the plot area sizes the same simply duplicate the chart without the labels and then edit the Source Data to point at your other series. That way you only have to format one chart, since the rest are just duplicates of it.
Mynda
Hi Mynda,
That is exactly like I did including the No Fill for the duplicated Chart - not comfortable but doable. Thanks!
In the case of Small Multiples with two rows like in your regions example, this results in 3 charts to be ajusted (w/o x axis; w/o y axis; w/o y and x axis).
Thanks again,
Matthias
Yeah, unfortunately some things are still a bit laborious. You could write some VBA to automate it if it's going to be a regular task.
Mynda, I wish I could. 🙂
Before asking here I tried to simply print out ? ActiveChart.PlotArea.width and ? ActiveChart.PlotArea.width and then copy it to the duplicated chart(s):
Sub PlotAreaSize()
ActiveChart.PlotArea.Width = xy
ActiveChart.PlotArea.Height = yz
End Sub
But it did not render the intended size. I also tried reapplying the original size with the same luck. I have probably a wrong idea about how this should work.:-(
Dim w As Variant
Dim h As Variant
w = ActiveChart.PlotArea.Width
h = ActiveChart.PlotArea.Height
ActiveChart.Axes(xlValue).Delete
ActiveChart.Axes(xlCategory).Delete
ActiveChart.ChartArea.Format.Fill.Visible = msoFalse 'to check the results
ActiveChart.PlotArea.Width = w
ActiveChart.PlotArea.Height = h
Hi Matthias,
If you post your VBA and question in our VBA forum I'm sure someone will help you figure it out.
Mynda
Hi Mynda,
Good suggestion - I posted the issue there.
Thanks,
Matthias