Series colors

D

Dan Sully

I cant find the syntax to specify the color of each series in a line chart.
Can someone help? Thanks.

I get as far asWorksheets("mysheet").Chart(1).SeriesCollection(n) ...
 
A

Andy Pope

Hi Dan,

Try something like this,

Worksheets("Sheet1").chartobjects(1) _
.chart.SeriesCollection(1).Border.ColorIndex = 4


Dan said:
I cant find the syntax to specify the color of each series in a line chart.
Can someone help? Thanks.

I get as far asWorksheets("mysheet").Chart(1).SeriesCollection(n) ...

--

Cheers
Andy

http://www.andypope.info
 
D

Dan Sully

Thanks. That worked but gives rise to another question....

I tried ....Border.Weight=xlThick and it didn't do anything. How do I get
the line thickened?
 
A

Andy Pope

Hi Dan,

I see no reason why that should not work. Sure the line is not already
thick?

Try using the macro recorder, although not always perfect, the code
generated should give you a good idea of whats going on.

Dan said:
Thanks. That worked but gives rise to another question....

I tried ....Border.Weight=xlThick and it didn't do anything. How do I get
the line thickened?

--

Cheers
Andy

http://www.andypope.info
 
R

Rob Graham

On this topic, how do I specify the colours for each bit of a stacked bar
chart? Normally I've accepted Excel's own colour choice when I add a bit of
data, but sometimes the colours are too alike and it's difficult to tell
where one starts and the other ends.

Rob Graham
 
A

Andy Pope

Hi Rob,

Select one of the data series and press CTRL+1 (thats a numeric one) to
display the format dialog. On the pattern tab you can specify the area
colour.

To get colours other than those displayed you will need to change the
color palette. Locate via the main menu Tools > Options > Color
 

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