Chapter Contents |
Previous |
Next |
The GANNO Procedure |
Procedure features: |
| |||
Sample library member: | GR12N04 |
This example creates essentially the same Annotate data set used in Storing Annotate Graphics. It draws four colored squares and displays the data set as a single graphics output.
However, this time the example shows you how to use Annotate graphics to generate a drill-down graph (see About Drill-down Graphs). The example uses the HTML variable in the Annotate data set to specify linking information that defines each of the four squares as a hot zone. When the graph is viewed in a browser, you can click on a square to drill down to a related graph. For example, if you click on the green square, it drills down to a graph that confirms that you selected the green square.
The example uses the HTML device driver to generate the drill-down graph. To implement the drill-down capability, the Annotate data set uses the HTML variable to provide the linking information (see HTML Variable), and the GANNO procedure uses the IMAGEMAP= option to create an Imagemap data set. The presence of the HTML variable in the Annotate data set and the IMAGEMAP= option on the GANNO procedure causes the HTML device driver to generate an image map for the graph. It writes the image map to the file index.html, which the HTML device driver creates for displaying Web output (see Displaying Graphs on One Web Page (DEV=HTML)).
To prevent the HTML device driver from writing over the contents of index.html after the drill-down graph has been generated, the example switches to the GIF device driver. It then runs four GSLIDE procedures to generate the target output. Each GSLIDE procedure uses the NAME= option to name the graph it produces, ensuring that the GIF driver creates files named green.gif, blue.gif, red.gif, and gray.gif. These are the files that are referenced as targets by the strings that are specified for the Annotate data set's HTML variable.
/* define the output location */ filename webout 'path-to-Web-server'; /* set the graphics environment */ goptions reset=global gunit=pct colors=(black blue green red); |
/* set the graphics options for the web page */ goptions dev=html gsfname=webout xpixels=450 ypixels=400 transparency; |
/* generate annotate graphics */ proc ganno annotate=squares imagemap=annomap description='Four squares'; run; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.