Graph Applet HTML Generator

Graph Applet HTML Generator Drill-Down Example

Note: This example addressing drill down using the DS2GRAF macro and Graph Applet. Use the drill capabilities provided with SAS/GRAPH software to accomplish drill down using SAS/GRAPH ActiveX Control.

This example uses the Graph Applet HTML Generator to create an HTML file that displays a bar chart using Graph Applet. However, You can use some of this code to create a drillable graph for the SAS/GRAPH ActiveX Control. Remember to check the syntax documentation for differences when creating for Graph Applet versus creating for the ActiveX control.

This example does not create the pages that are displayed when you click on a bar in the chart. You can create these pages using any SAS Web tool (such as ODS or an HTML Formatting Tool), or you can create them using your favorite HTML editor. Just remember to name your files using the names generated from the DRILURL information you specified.

The SAS program used in this example contains three sections:

Notice that the macro invocation includes the DRILDOWN and DRILURL arguments. Both of these arguments are required to enable the drill capabilities of Graph Applet. The DRILURL argument dynamically builds the drill URL based on the information you specify.

In this example, we have defined the URL for the drill pages to be the root directory of our Web server (specified by web_server_name), and the filename to be determined by the value of our independent variable, which we defined as 'symbol.' So, if you click on the bar that represents the unit price for Gateway, your browser requests a page named GTW.html from the Web server.

You can run this example at your site by copying the code above and pasting it into a SAS program editor. If you want to try this, you will need to specify a valid location for HTMLFILE and for ARCHIVE. You must also specify a valid Web server name in the DRILURL value.

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.