BAR Function
Draws a rectangle whose lower left corner is defined by the internal variables (XLAST, YLAST) and whose upper right corner is defined by the specified X, Y variable pair. You can define the color of the fill, the fill pattern, and the edge lines to be drawn.
| Alias: | BOX |
|---|---|
| Updates: | XLAST, YLAST |
Table of Contents
Syntax
Associated Variables
COLOR='color'
specifies the color of either the interior of the bar or the outline of the bar. Color can be any SAS/GRAPH color name. See COLOR Variable. The part of the bar affected depends on the value of the STYLE variable. If STYLE specifies a pattern or fill, the COLOR variable determines the color of the interior. If STYLE specifies an empty pattern, the COLOR variable determines the color of the outline of the bar.
GROUP=group-value
MIDPOINT=midpoint-value
SUBGROUP=subgroup-value
specify coordinates for HBAR and VBAR charts from the GCHART procedure. Use these variables only with the data coordinate systems 1, 2, 7, and 8.
| See | GROUP Variable |
|---|---|
| MIDPOINT Variable | |
| SUBGROUP Variable |
HTML='link-string'
specifies the text that defines the drill-down link.
| See | HTML Variable |
|---|
LINE=0–3
specifies the direction in which to adjust the outline of the bar. Use LINE values 1 and 2 to a particular bar from an axis or adjoining area.
| Default | 1 |
|---|---|
| See | LINE Variable |
SIZE=line-thickness
specifies a line thickness for the rectangle
Sample Line Thicknesses Used with the SIZE Variable
| See | SIZE Variable |
|---|
STYLE='SOLID' | 'EMPTY' | style<density>
specifies the pattern that fills the bar.
SOLID
specifies a solid color fill.
EMPTY
specifies no fill.
style<density>
specifies a fill style and density.
| Default | EMPTY |
|---|---|
| Restriction | The JAVAIMG device supports only SOLID and EMPTY. |
| See | STYLE Variable: Patterns |
WHEN='B' | 'A'
specifies when to draw the bar in relation to other procedure output.
B
specifies that the bar is drawn before the other procedure output is drawn.
A
specifies that the bar is drawn after the other procedure output is drawn.
| See | WHEN Variable |
|---|
X=horizontal-coordinate
Y=vertical-coordinate
Z=depth-coordinate
XC='character-type-horizontal-coordinate'
YC='character-type-vertical-coordinate'
define the upper right corner of a bar (rectangle) whose lower left corner is (XLAST,YLAST). Points Used to Construct a Bar illustrates the use of these coordinates.
| Restriction | The Z= variable is used with the G3D procedure only. |
|---|---|
| See | X Variable |
| Y Variable | |
| Z Variable | |
| XC Variable | |
| YC Variable |
XSYS='coordinate-system'
specifies the coordinate system for the X or XC variable. The XC variable can be used only with XSYS='2'.
| See | XSYS Variable |
|---|
YSYS='coordinate-system'
specifies the coordinate system for Y or YC variable. The YC variable can be used with YSYS='2' only.
| See | YSYS Variable |
|---|
ZSYS='coordinate-system'
specifies the coordinate system for the Z variable.
| Restriction | The ZSYS= variable is used with the G3D procedure only. |
|---|---|
| See | ZSYS Variable |
Details
Points Used to Construct a Bar shows how the XLAST, YLAST, and X, Y variables define the diagonal corners of the bar. With character data, the XC and YC variables are used in place of the X and Y variables. The values of the XLAST and YLAST variables are usually initialized with a MOVE function or another function that updates the XLAST and YLAST pair. When the XC variable is used, set XSYS='2'. When the YC variable is used, set YSYS='2'.