legend colors ... use darkest ones; prefer specific symbols for readability

L

L Mehl

The user has asked that the darkest colors and specific symbols be used for
readability of the chart:
Black is the most preferred color; white is the least-preferred.
Symbols to have lowest priority for use are "-" and "--" (double-wide line).

Example:
The first series to be plotted will have Format Data Series | Patterns
settings as follows:
Marker --
Style = diamond
Foreground (color) = black

Recording a macro for setting
Style = diamond
Foreground (color) = black

resulted in
.MarkerForegroundColorIndex = 1
.MarkerStyle = xlDiamond

Is there a list of the VBA codes for the rest of these 2 properties?

Has anyone seen a method using VBA code for using colors and symbols in
order of preference for a many-series chart?

Thanks for any help.

Larry Mehl
 
J

Jon Peltier

Larry -

In the VB Editor, open the Object Browser (F2 key), and find Series in
the list of classes in the left pane. In the right pane, select
MarkerStyle. Under these panes it says

Property MarkerStyle As XlMarkerStyle

Click on the XlMarkerStyle hyperlink to access the whole set of marker
style constants. The object browser is a very helpful tool for getting
all these details.

The color index enumerates the colors in the workbook's palette. The
easiest way to see these is to enter this formula into cells A1:B28 of a
new worksheet:

=(COLUMN()-1)*28+ROW()

This puts the numbers 1 through 56 (the number of colors in the palette)
into the cells. Select this range, switch the the VB Editor, type this
into the Immediate window all in one line (it wraps to the next line
below), and press Return:

for each cel in selection.cells : cel.interior.colorindex = cel.value : next

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
J

Jon Peltier

Larry -

In the VB Editor, open the Object Browser (F2 key), and find Series in
the list of classes in the left pane. In the right pane, select
MarkerStyle. Under these panes it says

Property MarkerStyle As XlMarkerStyle

Click on the XlMarkerStyle hyperlink to access the whole set of marker
style constants. The object browser is a very helpful tool for getting
all these details.

The color index enumerates the colors in the workbook's palette. The
easiest way to see these is to enter this formula into cells A1:B28 of a
new worksheet:

=(COLUMN()-1)*28+ROW()

This puts the numbers 1 through 56 (the number of colors in the palette)
into the cells. Select this range, switch the the VB Editor, type this
into the Immediate window all in one line (it wraps to the next line
below), and press Return:

for each cel in selection.cells : cel.interior.colorindex = cel.value : next

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
L

L Mehl

Hi Jon --

Thank you very much for these clear explanations of shapes and colors. This
information will help us prioritize the shapes and colors we want to use.

Larry
 

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