PDA

View Full Version : chart background divided into segments



koala
11-23-2007, 09:22 PM
Hello forum,

I am not sure if I need VBA for this.

I have approx 40 line charts embedded into my workbook (1 for each workshheet)

Each line displays 56 points of data. (8 weeks data .. a point for each day)

I want to have a different colour backgraound for each two weeks data, therefore want the background divided into 4 colours.

Does anyone know how to do this?

cheers
Koala

Bob Phillips
11-24-2007, 03:16 AM
I don't how, or whether, you can do what you want, but you could use a fill colour with a gradient.

I would caution against overuse of colour though, it can often diffuse the message.

Andy Pope
11-24-2007, 03:57 AM
You can create the effect you a combination chart.

Assuming your line chart as it's 56 data points in the range A1:B57 you need to add 4 more data series.
In the range C1:F2 add the following data

C1: =Week1-2
D1: =Week3-4
E1: =Week5-6
F1: =Week7-8

C2: =2
D2: =2
E2: =2
F2: =2

In xl2003 you can select and drop the range C1:F2 on to the chart to add the 4 new series.

Select one of the series and change the chart type to Stacked Bar.
Repeat for the other 3 series.
Select one of the bars and display the format dialog. On the Series Options tab set the Gap Width to zero.
Format each of the bars as required.
Finally double click the secondary value axis and set the Maximum scale to 8.

You should now have your 4 vertical bands.

The same data can be used in the other 39 charts.
And to save time you record the steps in a set of macros and apply them to each chart.