Previous Page | Next Page

The CHART Procedure

PROC CHART Statement


PROC CHART <option(s)>;

Options

DATA=SAS-data-set

identifies the input SAS data set.

Main discussion: Input Data Sets
Restriction: You cannot use PROC CHART with an engine that supports concurrent access if another user is updating the data set at the same time.
FORMCHAR <(position(s))>='formatting-character(s)'

defines the characters to use for constructing the horizontal and vertical axes, reference lines, and other structural parts of a chart. It also defines the symbols to use to create the bars, blocks, or sections in the output.

position(s)

identifies the position of one or more characters in the SAS formatting-character string. A space or a comma separates the positions.

Default: Omitting (position(s)), is the same as specifying all 20 possible SAS formatting characters, in order.
Range: PROC CHART uses 6 of the 20 formatting characters that SAS provides. Formatting Characters Used by PROC CHART shows the formatting characters that PROC CHART uses. Formatting Characters Commonly Used in PROC CHART Output illustrates the use of formatting characters commonly used in PROC CHART.
formatting-character(s)

lists the characters to use for the specified positions. PROC CHART assigns characters in formatting-character(s) to position(s), in the order that they are listed. For example, the following option assigns the asterisk (*) to the second formatting character, the pound sign (#) to the seventh character, and does not alter the remaining characters:

formchar(2,7)='*#'
Interaction: The SAS system option FORMCHAR= specifies the default formatting characters. The system option defines the entire string of formatting characters. The FORMCHAR= option in a procedure can redefine selected characters.
Tip: You can use any character in formatting-characters, including hexadecimal characters. If you use hexadecimal characters, then you must put an x after the closing quotation mark. For example the following option assigns the hexadecimal character 2D to the second formatting character, the hexadecimal character 7C to the seventh character, and does not alter the remaining characters:
formchar(2,7)='2D7C'x
See also: For information on which hexadecimal codes to use for which characters, consult the documentation for your hardware.

Formatting Characters Used by PROC CHART
Position ... Default Used to draw
1 | Vertical axes in bar charts, the sides of the blocks in block charts, and reference lines in horizontal bar charts. In side-by-side bar charts, the first and second formatting characters appear around each value of the group variable (below the chart) to indicate the width of each group.
2 - Horizontal axes in bar charts, the horizontal lines that separate the blocks in a block chart, and reference lines in vertical bar charts. In side-by-side bar charts, the first and second formatting characters appear around each value of the group variable (below the chart) to indicate the width of each group.
7 + Tick marks in bar charts and the centers in pie and star charts.
9 - Intersection of axes in bar charts.
16 / Ends of blocks and the diagonal lines that separate blocks in a block chart.
20 * Circles in pie and star charts.

Formatting Characters Commonly Used in PROC CHART Output

[Formatting Characters Commonly Used in PROC CHART Output]

LPI=value

specifies the proportions of PIE and STAR charts. The value is determined by

[equation]

For example, if you have a printer with 8 lines per inch and 12 columns per inch, then specify LPI=6.6667.

Default: 6

Previous Page | Next Page | Top of Page