SAS.GRAPH 9.1 Reference, Volumes I and II

Using the DS2CSF Macro

The Rangeview Applet generates a critical success factor (CSF) diagram, as shown in the following figure.

Display 20.1: Critical Success Factor Diagram

The critical success factor diagram is fully configurable, based on either the classical style (shown above) or a style that resembles a digital gauge, as shown in the following figure.

Display 20.2: Digital Display

Ranges of values, colors, text sizes, and text fonts are all specified in the SAS/GRAPH program. You can also specify a drill-down URL that will be displayed in a specified browser window when the Web user selects any part of the diagram.

When to Use the Rangeview Applet

The Rangeview Applet provides a simple means of displaying a significant value within a range of values. The drill-down functionality enables you to provide additional information that is related to that critical success factor. While the level of interactivity is not high, the applet can generate CSF diagrams quickly, and uses your own style sheets to standardize the appearance of the diagram.

Programming with the DS2CSF Macro for the Rangeview Applet

The DS2CSF macro generates Web output for the Rangeview Applet. This macro generates and formats an HTML output file, identifies the location of the Rangeview Applet s Java archive, configures the diagram, and provides the data that the applet uses to display the diagram.

Follow the steps shown within this code to generate an HTML output file that will display a critical success factor diagram.

/* Define the name and storage location of the HTML output file */ /* and the location of the jar file */ %let htmlfile = your_path_and_filename .htm; %let jarfile = http:// your_path_to_archive ; /* Run a DATA step */ data test; myvar=80; run; /* Specify an optional title */ title1 Test Results Indicate Readiness; /* Run the DS2CSF macro */ %ds2csf(htmlfile=&htmlfile, /* files and data sets */ archive=rvapplet.jar, codebase=&jarfile, openmode=replace, data=test, var=myvar, /* CSF variable */ csftyp=digital, /* Specify appearance */ bgtype=color, bg="#E0E0E0", tcolor="#002288", tsize=5, tface="Arial", fcolor="#002288", fsize=3, clabval=red, clabtxt=fuchsia, depth=Two_And_A_Half_Dimension, valuepos=Bottom_Center, labelpos=Top_Center);

Display the HTML output file in a Web browser to run the Rangeview Applet and display a critical success factor diagram.

In the preceding example, the arguments of the DS2CSF macro specify the path to the HTML output file and the Java archive of the Rangeview Applet. The VAR argument identifies the variable in the data set that is to be illustrated in the diagram. The value that is to be indicated as the critical success factor is the value for this variable in the first observation in the data set. A digital-style diagram is specified by the CSFTYP= argument.

For more information on usages of the Rangeview Applet, see Enhancing Presentations for the Rangeview Applet on page 529.

For definitions of all of the arguments of the DS2CSF macro, see DS2CSF Macro Arguments on page 530.

Категории