Stacked Area Charts

Airfix9

Well-known Member
Joined
Sep 23, 2005
Messages
886
Hi all,

I am creating a bonus template for our salesforce. It tracks how they are doing against 4 key criteria over the period of a quarter. What I would like to do, then, is to create a nice visual for the sales guys (oh look, a pretty picture!).

So, this is how I visualise it. Each of the four elements will be expressed as a percentage of the salesman's total salary. So consider the following data:
Book2
ABCD
1TimePassed0.00%49.23%100.00%
2Crit10.00%1.22%#N/A
3Crit20.00%2.00%#N/A
4Crit30.00%1.00%#N/A
5Crit40.00%2.00%#N/A
6Max0.00%4.92%10.00%
Sheet1


We can see above that the total amount of time passed in the quarter is 49.23%, so I need to plot the current position of each criteria along the X-axis accordingly. I don't, however want to plot the 100% value as this isn't known. The Max value, however, is a line from 0% to 10%, which is the maximum bonus available.

The way that I visualise the graph, then, is a stacked area chart with each criterion stacking on top of the previous one with the shading below until it reaches the line below. Alas, however, I can't seem to get this to work... chiefly because the lines rise up and then drop back down again (I thought =NA() was supposed to be unplottable). The idea is that, horizonally, the areas will colour until they get to the current position (49.23%) whereupon the colour will not show.

I have experimented with another set of data, commecing at the 49.23% level and projecting forward like this:
Book2
ABCD
1TimePassed0.00%49.23%100.00%
2Crit1#N/A1.22%2.47%
3Crit2#N/A2.00%4.06%
4Crit3#N/A1.00%2.03%
5Crit4#N/A2.00%4.06%
Sheet2


The issue here is that I can't seem to make the area transparent (no colour) without it covering up the real area graph.

This is driving me mad as I am sure that it should be possible and I am sure that it will look visually stunning when I manage to deal with it properly.

Where am I going wrong?

Any help gratefully received.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Re: Stacked Area Charts - Still need help

Hi all,

Not sure if I have confused... Here is a picture of what I am looking to achieve:



Any ideas, please?
 
Upvote 0
dunno if you can do it with graphs. but for pictures, select the picture, then on the picture toolbar, click on "set transparent colour" to make white areas become see-through.

you may have to export your graph to paint, save it as a picture and then insert it into your sheet.

just record a macro and it should do it fine if you need to do that long process.
 
Upvote 0
Alas, the file is interactive - the same file is used for each salesman and they punch in their name, which is checked against their NTLogin and, if it passes, the data is downloaded. This means that the graph is re-drawn each time!

This needs to be an on-board solution within the file itself.
 
Upvote 0
so did you try the "set transparent colour" option at all? This is an on board solution if its works...

why cant you have a macro that runs to make the graph when a user logs in ?
 
Upvote 0
The issue is what type of graph to create. The only version that comes (anywhere near) close is an Area graph but, because it can't plot the #N/A values, it creates this graph:



The alternative is to project the data forward to the end of the quarter, but I can't change the 3rd data point to colourless - you can only change the colour of the whole series.

Another idea is to create dummy data to project forward, but they don't follow on from the existing points, rather they stack on top.

My VBA skills are growing but they don't yet extend to graphing.

This is starting to get me down!
 
Upvote 0
Re: Stacked Area Charts - Still not solved

Any suggestions please?

Sorry to bump.
 
Upvote 0
could you create your graph, as per post 6.

Then just paste on top of the chart, a picture of a blank area of chart, so that it looks like your picture in post 2 ?

This is obviously bodging it a little, but it would look correct!

you could then use print screen and paint to make it into a picture, and insert it into your sheet as a clean looking chart - though it would not be dynamic per se.

you could record a macro whilst doing it which could be linked to a button. This would essentially manually update your chart.

you could even make it a private macro to that sheet, with the "with change" parameter. so whenever a value on your graph data sheet changes, it re runs the chart macro, so you can have a dynamic graph.

personally i would use a button, and just update the chart when i wanted it to be refreshed.
 
Upvote 0
Sorry, this is (a) beyond my skills a little and (b) not within my self-imposed parameters of providing a professional service to my sales force.

Am beginning to suspect that this is not possible in a fully-automated way.

Thanks for your help anyway.
 
Upvote 0
then you should a) learn... how can you expect a response that will be 100% easy peasy. What I suggested is actually very easy, you just press record macro, then copy paste a few things... then just press stop recording...

b) pressing a button to update a chart seems perfectly professional if it provides the correct printable output to your users...
 
Upvote 0

Forum statistics

Threads
1,216,115
Messages
6,128,915
Members
449,478
Latest member
Davenil

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