option, the SVG document is scaled to the dimensions specified in the SVGVIEWBOX=
option.
If you specify the SVGHEIGHT= option and the SVGWIDTH= option using percentage
units, the SVG document scales to the size of the browser window whenever the browser
window changes size. If these options are specified using units other than percentage,
such as in, cm, or px, the SVG document is a static size and does not scale to the
browser window when the window changes size.
For more information, see the following topics:
• “ODS PRINTER Statement ” in SAS Output Delivery System: User’s Guide
• “SVGVIEWBOX= System Option” in SAS System Options: Reference
• “PAPERSIZE= System Option” in SAS System Options: Reference
• “Creating a Static viewBox” on page 326
Interaction between SAS SVG System Options and the SVG Element
Attributes
SAS uses the values of the SVGHEIGHT=, SVGWIDTH=, SVGVIEWBOX=,
SVGPRESERVEASPECTRATIO=, SVGX=, and SVGY= system options as values for
their respective attributes on the outermost <svg> element: height, width, viewBox, and
preserveAspectRatio. For example, if you specify SVGWIDTH=“400” and
SVGHEIGHT=“300”, SAS creates the <svg> element with the attributes width=“400”
and height=“300”. The values of the SVGX= and SVGY= system options are used only
on embedded <svg> elements for the x and y attributes.
All of these system options have a null default value. When the SVGVIEWBOX=
system option is null, SAS determines the viewBox size based on the value of the
PAPERSIZE= system option. Therefore, if you do not specify a value for any of these
system options, the only <svg> attribute that SAS sets is the viewBox attribute using the
SAS SVG system options. Other <svg> attributes, such as version and xmlns are set by
SAS and not by using system options.
SAS creates the following <svg> element when all of the SAS SVG system options are
set to their default values:
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:space="preserve" baseProfile="full" version="1.1"
id="SVGMain" onload='SVGMain_Init("SVGMain")'
viewBox="-1 -1 801 601">
The SVGPRESERVEASPECTRATIO= system option is used to set the
preserveAspectRatio attribute in the <svg> element and has an effect only when the
viewBox attribute has also been specified in an SVG document.
Negative values can be specified for the values of SVG options. However, if a negative
value is specified for the SVGHEIGHT= option or the SVGWIDTH= option, or the
height or width arguments in the SVGVIEWBOX= option, the SVG document is not
rendered by the browser. It can be useful to specify negative values for the x and y
arguments of the SVGVIEWBOX= option to place the origin of the SVG document. A
negative argument in the SVGVIEWBOX= option shifts the output to the right. A
negative value of the SVGVIEWBOX= option shifts the placement of the document
downward.
Creating SVG (Scalable Vector Graphics) Files Using Universal Printing 325