Generating Web Output with the Annotate Facility

You can use the Annotate facility to generate drill-down Web presentations in two ways: you can use PROC GANNO and an Annotate data set as the sole basis of a drill-down presentation, or you can apply an Annotate data set to add drill-down functionality to a Web presentation that is generated with the ACTXIMG, GIF, JPEG, or PNG device driver.

When to Use PROC GANNO to Generate Web Output

You can use ODS, the GANNO procedure, an Annotate data set, and a device driver to generate a Web presentation with drill-down links. This method of generating a drill-down presentation is preferred if you do not need to use an image from another SAS/GRAPH procedure in your Web presentation. For example, you could use PROC GANNO to generate an HTML output file that showed a JPEG image, with accompanying text, and a selectable label containing the text “Click Here”. Larger presentations with multiple drill-down links are also entirely feasible.
To generate a drill-down graph with PROC GANNO, see Generating Web Links with the Annotate Facility.

When to Apply Annotate Data Sets to Web Output

You can use Annotate data sets to add drill-down links to Web presentations generated by any procedure that uses the ANNOTATE= option. The Web presentation must be generated with the ACTXIMG, GIF, JPEG, or PNG device driver.
Using an Annotate data set to add drill-down links is preferable in the following circumstances:
  • When you cannot add drill-down functionality by other means. Some SAS/GRAPH statements do not support the HTML= option, which SAS/GRAPH needs to generate an image map in the HTML output file. If the procedure does support the ANNOTATE= option, then you can use that procedure as the basis of a drill-down Web presentation.
  • When you do not want Web users to drill down by selecting graph elements. For example, if you did not want your Web users to drill down by selecting the bars in a bar chart, you could define graphics elements with drill-down links using the Annotate facility.
To use the Annotate facility to add drill-down links to a Web presentation, see Generating Web Links with the Annotate Facility.

Generating Web Links with the Annotate Facility

Follow these steps if you are adding drill-down links to a Web presentation or if you are generating an entire Web presentations with PROC GANNO:
  1. Plan your Web presentation so that you know how and where you want to apply Annotate graphical elements with drill-down links. Also determine your drill-down URLs.
  2. Generate an Annotate data set. Elements that can be defined as drill-down hot zones are generated by Annotate functions that use the HTML variable. To see which functions use the HTML variable, refer to Annotate Variables Used with Annotate Functions. To generate the Annotate data set, see Using Annotate Data Sets.
  3. Specify the ACTXIMG, GIF, JPEG, or PNG device driver using the DEVICE= option in a GOPTIONS statement.
  4. Close the listing destination and open an HTML output file in ODS.
    ods listing close;
    ods html file="annodril.htm"
        style=science;
  5. Generate a GIF, JPEG, or PNG image and identify the Annotate data set. Use the GANNO procedure or another SAS/GRAPH procedure that uses the ANNOTATE= option.
  6. Close the HTML output file.
  7. Generate any additional HTML files or images as needed to provide files that are named in drill-down URLs.