Controlling Gap Width for BAR Chart

F

Fazi

Hi,

I have the following data for example.

A = 2
B= 3
C = 4

I can create a 2 D Bar chart from this quite easily.

Now If I make the data to

A = 2 , 3
B= 3 , 4
C = 4 , 5

I do want to plot the data on the basis of first two values as
mentioned in the first example, but I want to control the width of the
Bar from the value given after comma. Please help.
 
D

Del Cotter

I have the following data for example.
A = 2 , 3
B= 3 , 4
C = 4 , 5

I want to plot the data on the basis of first two values as mentioned
in the first example, but I want to control the width of the Bar from
the value given after comma.

You don't say what width you want the gaps between bars to be, so I will
assume 1 for all bars. Arrange your data like so:

[blank] Height Width Key
0 0
1 0 1 gap
1 2
4 2 3 A
4 0
5 0 1 gap
5 3
9 3 4 B
9 0
10 0 1 gap
10 4
15 4 5 C
15 0
16 0 1 gap

The top of the left hand corner, to the left of the "Height" label, must
be a blank empty cell, so delete my "[blank]" label, which is only there
for instruction. Now select *just the first two columns*, including the
"Height" column heading, and start the Chart Wizard. Select Chart
Type="Area", and continue on with the wizard until you have a complete
chart.

Now, it won't look right at first, but here's how you fix it. Go to
"Chart.. Chart Options.. Axes", and change the selection for the
Category (X) axis from "Automatic" to "Time-scale". Now your chart
should look right. The X axis labels are now in date format, so change
them back to plain numbers, formatted according to your preferences.

The first column is the cumulative width of all columns and their gaps.
I only include the third and fourth columns as a guide to show you how
the width works
 
D

Del Cotter

I read your post slightly different to Del, in that you want to specify
the columns width rather than the gap.

No, what I meant was that specifying a variable width only was
insufficient information when deciding to abandon the built-in bar chart
format and adopt an Area Chart with Time-scale range. Your example and
Jon's are both analogous to bar charts with no gap, but a gap might be
wanted; if so, that needs to be specifically allowed for in the design,
unlike bar charts, which take care of it automatically.

If you look at my example, you'll see it's really just the same
technique as yours and Jon's-- unsurprisingly, as I learned it from
Jon's example that you provided the link to. My adding gaps is just
analogous to including bars of zero height between each data bar. The
gaps I made aren't of variable width, they're all 1 unit wide.
 
A

Andy Pope

I should have look at your reply more closely. I thought you using
padding data to give variable gaps between columns.

Cheers
Andy
 

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