SAS.GRAPH 9.1 Reference, Volumes I and II
One thing that distinguishes the Metaview applet is the run-time controls that it provides to users. The following table shows some of the controls that the Metaview applet can present.
| Page-selection slider control |
| Slide-show control |
| Zoom control |
The following picture shows a graphic in which all three controls are present. You can also use parameters to suppress the display of any of the controls.
Page-Selection Slider Control
Metacodes (that are passed with the METACODES parameter to the Metaview applet) can contain multiple graphs when they are the output of a SAS/GRAPH procedure containing a BY statement, or when they are the output ( concatenated together) of multiple SAS/GRAPH procedures. Because ODS only passes a single graph at a time with the METACODES parameter to the Metaview applet, the recommended way to enable a page-selection slider control at run time is by using the META2HTM macro.
The following code fragment uses the META2HTM macro. Notice that two instances of PROC GCHART are invoked in between the first call to META2HTM with CAPTURE=ON and the final call to META2HTM with CAPTURE=OFF. Notice also that in the final call to META2HTM the parameter OPENMODE =APPEND so that the metacodes from the second process are appended to those from the first (with embedded delimiters between graphs). In fact, because both GCHART procedures include a BY QUARTER statement, each procedure produces four graphs, for a total of eight graphs in all.
filename _webout 'path_and_filename.htm'; %meta2htm(capture=on, htmlfref=_webout, openmode=replace, /* Specify codebase if metafile.zip not in same directory */ /* as html file. */ codebase=http://web_server_name/sasweb/graph archive=metafile.zip, hspace=1, vspace=2); goptions reset=all device=javameta border ftext="Helvetica" ftitle="Helvetica"; title1 '1993 Sales'; proc gchart data=prdsummary(where=(year=1993)); hbar3d country / sumvar=actual subgroup=product sum shape=hexagon caxis=black cframe=CXb0c1f4; by quarter; run; quit; title1 '1994 Sales'; proc gchart data=prdsummary(where=(year=1994)); hbar3d country / sumvar=actual subgroup=product sum shape=hexagon caxis=black cframe=CXb0c1f4; by quarter; run; quit; %meta2htm(capture=off, htmlfref=_webout, openmode=append); quit;
Slide-Show Control
Metacodes (that are passed with the METACODES parameter to the Metaview applet) can contain multiple graphs when they are the output of a SAS/GRAPH procedure containing a BY statement, or when they are the output (concatenated together) of multiple SAS/GRAPH procedures. To suppress the slide-show control, do one of the following:
ODS | Specify SLIDECONTROLENABLED=FALSE in the ODS statement, which should look like this:
ods html file="filename.htm" parameters=("SLIDECONTROLENABLED=FALSE"); |
META2HTM | Specify SLIDECTL=N. For example:
%meta2htm(capture=on, htmlfref=_webout, openmode=replace, slidectl=n, ...); |
Zoom Control
Unless you choose to suppress it, the Metaview applet always displays a zoom control which allows a user to zoom in on and out of the image. To suppress the zoom control, do one of the following:
ODS | Specify ZOOMCONTROLENABLED=FALSE in the ODS statement, which should look like this:
ods html file="filename.htm" parameters=("ZOOMCONTROLENABLED=FALSE"); |
META2HTM | Specify ZOOMCTL=N. For example:
%meta2htm(capture=on, htmlfref=_webout, openmode=replace, zoomctl=n, ...); |