2

I know how to set the size of the diagram, but I cannot find the option for setting the size of the chart area (not sure if this is the correct name in English). The box I want to change is marked with a red arrow in the figure below.

enter image description here

2 Answers 2

1

With VBA, assuming you set:

Set myChart = ActiveSheet.ChartObjects(1)

Then you can use:

myChart.Chart.PlotArea.Height = desired width

or:

myChart.Chart.PlotArea.Width = desired height

If you want to enlarge the plot area to a value greater than the current chart area, you will need to enlarge the latter first, using:

myChart.Chart.ChartArea.Height = desired height
myChart.Chart.ChartArea.Width = desired width
1
  • That;s the plot area, but the rectangle is really the plot "inside" area, and the plot area includes a margin that has room for axis labels etc. You can change the plot area in code, not the plot inside area, so you need to do a little algebra in your code to make it work out. Commented Nov 2, 2018 at 2:19
3

The easiest (non-VBA) way I know to do this is:

  1. Build your chart
  2. Select Page Layout from View > Workbook Views. This will let you set your dimensions in "real" units (e.g. inches, mm).
  3. Adjust your column width and row height to the required size.
  4. Select Snap to Grid from Page Layout > Arrange > Align
  5. Arrange your chart so that the Chart Area snaps to a cell of the required dimensions.
1
  • 1
    Nice workaround! Commented Oct 29, 2018 at 12:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .