You can integrate an SVG graph in an HTML file by using the ODS HTML5
SVG_MODE='INLINE' statement.
For information about creating SVG document in SAS/GRAPH, see “Generating SVG,
PNG, GIF, and TIFF Graphics ” in SAS/GRAPH: Reference.
Linking to an SVG Document
If you link to an SVG document in an HTML document and you are using the default
values for the SVG system options, the SVG document opens in the browser window
and scales to the size of the viewable area in the window. For an example of an HTML
file that links to an SVG document, see Figure 15.41 on page 338 and Figure 15.42 on
page 339.
Embedding SVG Documents in HTML Files
When you embed SVG documents in an HTML file, the height and width attributes of
the <EMBED> tag become the dimensions of the viewport. If you use the default values
for the SVG system options when you create your SVG document, the SVG document
scales to the size of the viewport. This is because there is no default value of the
SVGHEIGHT= and SVGWIDTH= system options, which effectively equates to
specifying a value of 100%. A value of 100% for these system options scales the SVG
document to 100% of the viewport.
If you do not specify height and width attributes on the embed tag, the viewport
dimensions are determined by the browser. The embedded document might not render as
you expected it to render.
The following HTML file demonstrates linking and embedding a stand-alone SVG
document in an HTML file:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<title>Linking and Embedding an SVG Document in an HTML Document</title>
<meta http-equiv="X-UA-Compatible" content="IE=9".
</head>
<body>
<p>Linking to an SVG document:</p>
<a href="sasprt.svg">SGPlot Graph</a>
<p>Embed the SVG document:</p>
<embed src="sasprt.svg" type="image/svg+xml" height="400" width="300">
</body>
</html>
Here is the HTML file:
Creating SVG (Scalable Vector Graphics) Files Using Universal Printing 337