Figure 15.42 A Stand-alone SVG Document Displayed as a Result of Clicking an HTML Link
The viewport is the area in the browser window that can be displayed and the SVG
document scales to 100% of the viewport.
The following example uses the ODS HTML5 destination to embed an SVG graph in an
HTML file:
ods html close;
ods html5 options(svg_mode="embed");
Creating SVG (Scalable Vector Graphics) Files Using Universal Printing 339
ods graphics /imagefmt=svg;
proc sgplot data=sashelp.stocks
(where=(date >= "01jan2000"d and stock = "IBM"));
title "Stock Trend";
series x=date y=close;
series x=date y=low;
series x=date y=high;
run;
ods html5 close;
ods html;
The default svg_mode for the HTML5 destination is INLINE. In order to embed the
SVG graph, you must specify SVG_MODE="EMBED" as an option in the ODS
HTML5 statement. Here is the <EMBED> element in the HTML file:
<embed style="height: 480px; width: 640px" src="SGPLOT.svg" type="image/svg+xml"/>
Integrating an ODS Graphics SVG Graph in an HTML5 File
To integrate an ODS Graphics SVG graph in an HTML file, you specify the option
SVG_MODE='INLINE' in the ODS HTML5 statement:
ods html close;
ods html5 options(svg_mode="inline");
ods graphics /imagefmt=svg;
proc sgplot data=sashelp.stocks
(where=(date >= "01jan2000"d and stock = "IBM"));
title "Stock Trend";
series x=date y=close;
series x=date y=low;
series x=date y=high;
run;
ods html5 close;
ods html;
Here is the HTML file with the integrated SVG graph:
340 Chapter 15 Printing with SAS
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.227.4