Adding average lines to column plot

vbacoder

Active Member
Joined
Jul 7, 2007
Messages
354
Hi everyone,

I have a column chart in which the x-axis is split into categories, say apple, pair, grape. For each category, I have a count for each quarter in the year. So the chart is really a clustered column chart showing columns for Q1, Q2, Q3, Q4 in each of apple, pair and grape.

I would now like to add horizontal average lines that span the full horizontal range of each group of columns - one for apples, spanning all 4 columns, another for pair, again spanning all 4 columns under this category, and a third horizontal line for grape.

Please can anyone suggest a good way to do this. I have tried using dash points, but these don't span the full width of the 4 columns in each category.

Thanks,

vcoder
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Thanks for your reply. I've seen this site, and the instructions for adding a line to a chart are not quite what I want to achieve. I would like to produce average lines for each cluster of columns. Ordinarily this is easy if the x-axis is numerical, but when the axis is categorised by names, this is tricky to achieve.
 
Upvote 0
Hi

You can easily get the average of each cluster from the source values.

For ex., assuming the average of the values in the first cluster is 2, add a series, scatter type, with 2 points (0.6,2) and (1.4,2)

This would add an average line accross the first cluster (assuming you did not change the defauls).
 
Upvote 0
Yes, thanks. If done on a secondary axis, this works. I used error bars insead of 2 points per line.

vcoder
 
Upvote 0
Yes, thanks. If done on a secondary axis, this works. I used error bars insead of 2 points per line.

vcoder

I'm glad it's working for you, but in my test I created the second series also in the primary axis.
 
Upvote 0

Forum statistics

Threads
1,215,831
Messages
6,127,144
Members
449,363
Latest member
Yap999

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top