The GANNO Procedure |
Procedure features: |
| |||
Sample library member: | GANDRILL |
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. 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 ODS HTML destination 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). The presence of the HTML variable in the Annotate data set and the IMAGEMAP= option on the GANNO procedure causes the ODS HTML destination to generate an image map for the graph in the HTML output.
The example 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.
/* set the graphics environment */ goptions reset=all dev=gif gunit=pct goutmode=replace border; |
/* open the ODS HTML destination */ ods html body="gandrill.htm" path="."; |
/* generate annotate graphics */ proc ganno annotate=squares imagemap=annomap description="Four squares"; run; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.