View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Shading areas in a graph

Hi,

You should be able to create the shading effect by plotting some
additional series as area charts.

Assuming you have the following data layout for 6 data points.

B1:E1 Series labels. Actual, Planned, Yellow, Green
A2:A7 category labels
B2:B7 actual values
C2:C7 planned values

D2: =20%
D7: =100%
D3: =$D$2+(($D$7-$D$2)/(ROWS($D$3:$D$7))*(ROW()-ROW($D$2)))
copy down to D6

E2: =10%
E7: =80%
E3: =$E$2+(($E$7-$E$2)/(ROWS($E$3:$E$7))*(ROW()-ROW($E$2)))
copy down to E6

Create a line chart on the range A1:E7
move Yellow and Green series to secondary axis
Change their chart type to area
format area fill to match series name
format plot area as red. If you want a legend entry for red then add
another area series with the values of 1.
Fix both Y axis to have a maximum of 1

Cheers
Andy

Andrew wrote:
Difficult to explain but, I have a graph where I am tracking planned against
actual over time. I have a planned line from 0 to 100% against which I am
tracking the actual acheived - that part is easy, however i also have a set
of trigger bands green, yellow & red. Green is a band starting at 0% to 10%
on the left through to 0% to 80% on the right (sort of a triangle shape in
the bottom half of the graph). Yellow is from 10% to 20% on the left through
to 80% to 100% on the right (a band going from the bottom left to top right)
and the red is from 20% to 100% on the left through to 100% on the right
(upside down triangle at the top of the grapgh). The question is can I
coulour the grapgh to show these bands and then plot the planned vs actual on
top of them ?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info