XL: Changing Series Colors on a Surface Chart
ID: Q82015
|
The information in this article applies to:
-
Microsoft Excel for the Macintosh, version 4.0, 5.0, 5.0a
-
Microsoft Excel for Windows, versions 4.x, 5.0, 5.0c
-
Microsoft Excel for Windows 95, versions 7.0, 7.0a
-
Microsoft Excel 97 for Windows
-
Microsoft Excel 98 Macintosh Edition
SUMMARY
In the programs listed at the beginning of this article, you cannot select
individual series in a surface chart. Therefore, it is not possible to
change or edit the color of a series in a surface chart.
NOTE: This behavior is limited to surface charts in Microsoft Excel.
WORKAROUND
To work around this problem in Microsoft Excel version 5.0 or later,
change the formats for the legend keys that correspond to the series in
the surface chart. To do this, use one of the following methods.
Method 1
To change the color of the legend key manually, follow these steps:
- Switch to the chart that you want to edit.
- Click the legend.
- Click the legend key for the series that you want to edit.
NOTE: The legend key is the object in the legend that displays the color
and pattern for the series. The legend entry includes the object and the
text.
- On the Format menu, click Selected Legend Key.
NOTE: If Selected Legend Key does not appear on the Format menu, repeat
step 3.
- Make the changes you want and click OK.
Method 2
Microsoft provides programming examples for illustration only, without
warranty either expressed or implied, including, but not limited to, the
implied warranties of merchantability and/or fitness for a particular
purpose. This article assumes that you are familiar with the programming
language being demonstrated and the tools used to create and debug
procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to
provide added functionality or construct procedures to meet your specific
needs. If you have limited programming experience, you may want to contact
the Microsoft fee-based consulting line at (800) 936-5200. For more
information about the support options available from Microsoft, please see
the following page on the World Wide Web:
http://www.microsoft.com/supportnet/refguide/
To change the color of the legend key programmatically, use the following
syntax:
ActiveChart.Legend.LegendEntries(1).LegendKey.Interior.ColorIndex = 5
Note that 1 represents the first series in the chart and 5 represents the
color to change the series to (blue). These numbers must be integers.
NOTE: There is no workaround for this behavior in Microsoft Excel 4.0.
REFERENCES
For more information about changing colors of data series in charts, click
the Index tab in Microsoft Excel Help, type the following text
Colors, in charts
and then double-click the selected text to go to the "Change colors,
patterns, lines, fills, and borders in charts" topic.
Additional query words:
XL98 XL97 XL7 XL5 XL4
Keywords : kbcode xlchart
Version : WINDOWS:4.0,5.0,5.0c;7.0,7.0a,97; MACINTOSH:4.0,5.0,5.0a,98
Platform : MACINTOSH WINDOWS
Issue type : kbinfo
Last Reviewed: May 17, 1999