Force standard chart size

W

waxwing

I have a set of horizontal bar charts. The x-axis (vertical) values are
questions asked on a survey. The scale for the y-axis is set to a
minimum of 1 and maximum of 7 (the upper and lower limit of the
answers). However, the size of the chart adjusts based on the length
of the question. How can I keep the size of the chart the same? I'd
rather have more white space with the question text so that as I flip
the the various charts, the bar length is always relative to the
previous charts.

Thanks.
 
J

Jon Peltier

I've done this two ways.

1. Hide the real X axis, and set up a dummy series along the X axis with invisible
points at each tick label position. Use a data label at each point as a substitute
tick label. Since the lengths of the real tick labels are constant (zero), the
plotting rectangle doesn't have to shrink within the plot area to allow for longer
labels.

2. After creating each chart, and knowing the dimensions of the inner part of the
PlotArea (its read-only .InsideLeft and .InsideWidth properties), use VBA to adjust
the PlotArea .Left and .Width properties, which are read-write, until the
appropriate .InsideLeft and .InsideWidth are achieved. This file might have some
code you can refer to:

http://peltiertech.com/Excel/Zips/AlignChartDimensions.zip

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top