The syntax for invoking the Graph Applet HTML Generator is
%DS2GRAF(argument=value, argument=value,...)
You must include the DS2GRAF macro call with your SAS code. You cannot call it from a SAS command line. When including the macro call in your SAS code, you can use a list of arguments that are contained within parentheses and are separated with commas.
Use this syntax reference to determine the valid values and uses for the Graph Applet HTML Generator. To help you locate the appropriate arguments, we have grouped them into the following categories:
Some arguments are required and are noted as such in their descriptions. If an argument is required only in some cases, the exceptions are noted. The macro provides default values for some arguments. (Default values are shown in bold.) If the default value is acceptable, do not include the argument on the macro invocation. If you want to use a value other than the default, specify the argument and the value on the macro invocation.
Note: For SAS 9.2 or later, the DS2GRAF macro is no longer supported. The documentation on this Web site is for Version 9.0 or earlier of SAS. Please migrate your applications to use the GPLOT/GCHART procedures with ODS and the Java or ActiveX device driver.
Note: All the arguments in this section are required unless you are accepting the default value.
device=java | activex
DEVICE=ACTIVEX
. htmlfile=external-filename
Note: HTMLFILE
and HTMLFREF
are
mutually exclusive arguments.
htmlfref=fileref
Note: HTMLFILE
and HTMLFREF
are
mutually exclusive arguments.
openmode=APPEND | REPLACE
REPLACE
. If you do not want to replace the current contents,
supply APPEND
to add your new HTML-enhanced output to the end of
an existing file.
Note: OPENMODE=APPEND
is not valid is you are writing
your resulting HTML to a PDS on z/OS.
pw=password
READ
or PW
password. (You do not need to specify this argument
if the data set has only WRITE
or ALTER
passwords.)
runmode=B | S
The following arguments specify how the data should be processed. All required arguments are explicitly noted.
data=SAS-data-set-name
graphtyp=BAR | VBAR | HBAR | PIE | SCATTER | PLOT | LINE
Value | Description |
---|---|
BAR |
Vertical Bar Chart |
VBAR |
Vertical Bar Chart |
HBAR |
Horizontal Bar Chart |
PIE |
Pie Chart |
PLOT |
Scatter Plot without points joined |
SCATTER |
Scatter Plot without points joined |
LINE |
Scatter Plot with points joined |
shape=value
GRAPHTYP
.
Graph Type | Value | Default for Graph Applet |
Default for SAS/GRAPH Control for ActiveX |
---|---|---|---|
Bar Charts | Block Cylinder Hexagon Pentagon Prism Star |
Hexagon |
Cylinder |
Scatter Plots | Box Circle Cross Sphere None |
Box |
Sphere |
Pie Charts | Not Supported |
The default values for the SHAPE
argument are:
legend=Y | N
state=Y | N
To save state means that you can customize the graphic displayed by the applet (using the pop-up menus), drill down within the graphic, and return to the first graphic as you customized it. If you do not save state, when you return to the graphic it will appear as it did before you customized it.
Note that saving state does not work in all browsers. The browser must support scripting (JavaScript or VBScript) and the use of cookies.
depvar=var
depthvar=variable_name
This argument is valid on with vertical bar charts and scatter plots.
indepvar=var
groupvar=var
IGGROUP=Y
.
sbgrpvar=var
IGSBGRP=Y
.
cntlout=value
proc format cntlout=data_set_name (where=(type is ('C' 'N' 'P'))) <format_options>Refer to the PROC FORMAT documentation for information on generating a CNTLOUT data set.
Note: This argument is not valid for use with the ActiveX control.
drildown=Y | N
N
(drill down is not enabled).
drilfunc=value
drilmode=ANY | LOCAL | HTML | SCRIPT
ANY
, which means that when the applet receives
a drill-down event, it attempts to perform a "local" drill down. If
the local drill down isn't successful, it attempts an "html" drill
down, followed by a "script" drill down.
Notes:
LOCAL
when you want to drill down on a
subgroup in a chart. Local drill down is not valid for use with
the ActiveX control.
SCRIPT
if you are also using
DRILFUNC
.
DRILURL
if you are using
DRILMODE=HTML
.drilstrp=N | Y | C
N
, which is also achieved by omitting this argument from the
macro call. Use the values as described below:
N
leaves the drill-down string unaltered.Y
removes the white space and blanks from the beginning
and end of the drill-down string.C
compresses (removes) all white space and blanks in the
drill-down string.Note: This argument is not valid for use with the ActiveX control
driltarg=value
_self
for the current window_blank
for a new window_parent
for the parent window for the frameset_top
for the "top" documentRefer to an HTML syntax guide for the valid values of a TARGET attribute.
drilurl=http://your-server-name/%nrstr({&tag,[f]}{...}).html
formats=Y | N
FORMATS=N
.
Graph Applet also supports user-defined formats. If your formats are user-defined,
you must also specify the CNTLOUT
argument.
iggroup=Y | N
GROUPVAR
argument.
This argument is not valid for use with the ActiveX control.
igsbgrp=Y | N
SBGRPVAR
argument.
This argument is not valid for use with the ActiveX control.
labels=Y | N
LABELS=N
to force the generator to use variable names in your graph instead of the
variable labels.
round=number
NUMBER
.
Note: For better formatted output, apply a format to the appropriate data values prior to invoking the Graph Applet HTML Generator.
where=where-expression
Note: If your expression contains any special characters
(for example, % , & ), include %NRBQUOTE
in the argument
in order to process these characters correctly. This example shows the
correct way to specify Int%
.
where=%NRBQUOTE(value="Int%")
The following arguments provide formatting information to the the Graph Applet HTML Generator. The generator does not check for errors on fonts, colors, or sizes you specify. It simply allows any value you type. So, you should specify values that are supported on the system where the HTML page will be viewed.
You can specify the color associated with the areas of the applet or the ActiveX control. Use the following arguments to specify these colors. You can specify color values as a color name or a RGB value. See the list of color names that are supported by Graph Applet. (No equivalent list is provided for the ActiveX control.)
cback=value
cbackdrp=value
cfore=value
Note: This attribute is not supported in Release 8.1 or later of the SAS System.
colors=value1 value2 ...
colorvar=var
coutline=value
cpieside=value | SAME
CPIESIDE
in the
macro invocation, or if you specify SAME
,
the side color is the same as the top color for the slice
of the pie chart.
gback=VERTICAL | HORIZONTAL
GBACKS
and GBACKE
arguments. The GBACK
argument is ignored if a value is specified for the IBACKLOC
argument.
gbacke=color | BLUE
GBACK=VERTICAL
or the right color if GBACK=HORIZONTAL
.
gbacks=color | WHITE
GBACK=VERTICAL
or the left color if GBACK=HORIZONTAL
.
mcolors=value1 value2 ...
If this argument is not specified but a value was
specified for colors
, the the pop-up menu
will display the colors specified in the colors
argument. Otherwise, predefined default colors will be listed
in the menu.
Note: This argument is not valid for use with the ActiveX control.
In addition to specifying colors for elements in the graph, you can use the following arguments to define other appearance aspects.
backdrp=Y | N
Y
, you must also specify the
IBACKLOC
argument. If you specify N
for this
argument, a background color (CBACK
) is used.
Notes:
grid=Y | N
GRID=N
.ibackloc=image_URL
This argument is not valid for use with the ActiveX control.
ibackpos=CENTER | SCALE | TILE | POSITION
CENTER
SCALE
TILE
POSITION
IBACKX
and IBACKY
arguments.This argument is not valid for use with the ActiveX control.
ibackx=x-coordinate
ibacky=y-coordinate
You must specify values for both of these arguments if you also
specify IBACKPOS=POSITION
.
ibackurl=URL
IBACKPOS=POSITION
.
If you are including the Powered by SAS logo, you must use this argument
to link the image to the SAS Web site.
simpleth=integer | NEVER | 1000
SIMPLETH=NEVER
is specified, then simple geometry is never used, regardless of the number of chart elements.
This argument is not valid for use with the ActiveX control.
styleby=CATEGORY | CHART | GROUP | SERIES | SUBGROUP
CATEGORY
CHART
GROUP
SERIES
SUBGROUP
Note: When a value is specified for the SBGRPVAR
argument, then the STYLEBY
argument is ignored
view2d=N | Y
N
, which means that the graph is displayed as a
three-dimensional graph. If you want to render the graph in only
two dimensions, you must include this argument with a value of Y
.
Note: Beginning with Release 8.2, you can use this argument with the ActiveX control.
<APPLET>
or <OBJECT>
tag in the HTML file. All required
arguments are explicitly noted.
archive=value
http://web_server_name/sasweb/graph/graphapp.jar
.
This argument is required for Graph Applet. It is not valid for use with the ActiveX control.
codebase=value
This argument is required for Graph Applet. It is recommended, but it is not required for the ActiveX control.
id=value
<OBJECT>
tag in your HTML file, and you have included your own scripts or
DHTML that communicates with or acts on a particular instance of the
control.
name=value
<APPLET>
tag in your HTML file, and you have included your own scripts or
DHTML that communicates with or acts on a particular instance of the
applet.
height=value
400
.
width=value
750
.
align=value
LEFT, RIGHT, TOP, BOTTOM,
TEXTTOP, MIDDLE, ABSMIDDLE, BASELINE, BOTTOM
or ABSBOTTOM
.
alt=value
<APPLET>
tag, but cannot run Java applets. The default value
is SAS Institute Inc. Graph Applet
.
Note: This argument is not valid for use with the ActiveX control.
hspace=value
vspace=value
The arguments BGTYPE, BRTITLE, CENTER, CTEXT
and DOCTYPE
apply to the entire page for the current invocation
of the macro. So if you append data, the attributes of existing results will not change.
You may want to use these arguments only when you replace, rather than append, pages.
The rendering of some formatting arguments varies per browser. Some browsers may not support some of these options.
bgtype=NONE | COLOR | IMAGE
COLOR
or IMAGE
as the value, you must also use
the BG
argument. Valid values for BGTYPE
are
NONE
COLOR
BG
argument. If you specify
COLOR
as the value, you must also specify the color
in the BG
argument. IMAGE
IMAGE
as the value, you
must also specify the BG
argument to provide the name
and location of the image. Some browsers may not support the use
of background images.bg=value
BGTYPE=IMAGE
, value
identifies the fully-qualified path and filename of a background image that you want to use on your Web page. If you specified BGTYPE=COLOR
,
value
indicates the specific background color you
want to use on your page. You can specify color values using the
color name or the RGB value.
brtitle=value
center=Y | N
N
).
ctext=value
TCOLOR
argument overrides the
value specified by CTEXT
. You can specify color values
using the color name or the RGB value.
doctype=3.2 | value
DOCTYPE
tag in the HTML file. The default value is 3.2
, which
writes the following line to the top of your HTML file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
If you want something other than the default text, you can
provide the exact line to be added. If you supply a blank for
value
, nothing is added to the top of the file.
If you supply a value other than 3.2, you must include the exact
text that you want added. For example, if you want to reference
a different DTD, you must provide the entire string, including
!DOCTYPE
and the opening and closing angle brackets.
encode=Y | N
Y
. This will display the actual brackets in the browser. By
default, the brackets will be encoded. To not encode them and have the
generator pass the brackets to the browser (where the browser will attempt
to act on them as an HTML-formatting instruction), select N
.
pagepart=ALL | HEAD | BODY | FOOT
ALL
HEAD
HEAD
when you are going to append
additional output to this file from one of the formatters or from
the Graph Applet Generator.BODY
FOOT
For more information, see Using Page Formats.
saspower=value
Use of this image is by permission only. See the Powered by SAS logo guidelines and agreement. |
septype=NONE | RULE | IMAGE
NONE
RULE
<HR>
tag (a horizontal rule) to the HTML
file following the end of the applet.IMAGE
IMAGE
, you must also specify the
SEPLOC
argument to provide the name and location of the
image that you want to use. seploc=image-location
SEPTYPE=IMAGE
. The
value for this argument should be a fully-qualified pathname
or valid URL. The remainder of the arguments control the formatting of individual elements in the output. If you specify formatting information for an element not included in your output, the information is simply ignored.
When you specify any of
these arguments, an HTML tag such as <FONT COLOR=value>
is
added to all the appropriate lines in your HTML-formatted output.
tcolor=value
tface=value
tsize=value
N
, +N
, and -N
,
where N
is an integer. Valid values for N
are browser specific.ttag=value
PREFORMATTED + HEADER 3
.
For a list of all of the valid HTML tag names that you can use with this argument, see the list of available tags provided with the Graph Applet Generator.
The FOOTNOTE lines
fcolor=value
fface=value
fsize=value
N
, +N
, and -N
,
where N
is an integer. Valid values for
N
are browser specific.ftag=value
PREFORMATTED + HEADER 3
.
For a list of all of the valid HTML tag names that you can use with this argument, see the list of available tags provided with the generator.
tranlist=transcoding-list-name
charset=character-set-name
For a description of these arguments and an explanation about how to use them, see Implementing Character Transcoding in "Character Transcoding and National Language Support."
Use the following arguments to specify the location of your style sheets. These arguments are valid for all formatters and are described in Syntax for Including Style Sheets:
sshref1-sshref5=value
sstype1-sstype5=value
ssrel1-ssrel5=value
ssrev1-ssrev5=value
sstitle1-sstitle5=value
ssmedia1-ssmedia5=value
ssfile1-ssfile5=value
ssfref1-ssfref5=value
bdclass=value
fclass=value
sepclass=value
RULE
, the
supplied value is used on the CLASS
attribute of the
HR
tag. For an IMAGE
separator, the supplied
value is used on the CLASS
attribute of the IMG
tag. spclass=value
tclass=value
Note: z/OS is the successor to the OS/390 and MVS operating systems. SAS/IntrNet 9.1 for z/OS is supported on the MVS, OS/390, and z/OS operating systems and, throughout this document, any reference to z/OS also applies to OS/390 and MVS, unless otherwise stated.