Chapter Contents |
Previous |
Next |
SAS/AF Software: Class Dictionary |
The following table lists the attributes you can use to control color in a Chart control. For information on controlling the color in titles and footnotes, see Displaying Titles and Footnotes in a Chart Control. For information on using color as a response variable, see Using a Color Variable in a Chart Control
Attibutes | Specifies |
---|---|
axisColor | Color for the axis, axis labels, tick marks, and legend. |
backgroundColor | Color outside of the chart axes but within the control's border |
barColor | Bar colors in bar charts, or box colors in box charts. Not available for line and area charts. |
borderColor | Color for border around the Chart control |
borderTitleColor | Text color for the border's title |
chartBackgroundColor | Color within the chart axes |
colorVariable, color2Variable, color3Variable | Bar colors in bar charts, or box colors in box charts. Not available for line and area charts. |
faceColorMode | Whether bar colors affect the entire bar or only the bar tops |
gridColor | Color of the chart's grid lines |
highlightColor | Color a bar turns when it is selected |
missingColor | Color used for bars that have a color response value that is not defined in the Range entry |
outlineColor | Color for the outlines around bars |
For all the attributes except the color variables, you can specify a SAS color name like red, green, or blue. Alternatively, you can set the color to match a color value that is set in the SAS environment. For example, you can set the color to match the color used for the SAS notes that print in the Log window.
To set colors in the SAS environment, use the SASCOLORS window, which you can open with the Tools menu:
Tools | Options | Colors |
For a Chart control named chart1, the following code sets the backgroundColor attribute to blue:
chart1.backgroundColor = 'blue';
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.