Previous Page | Next Page

SAS System Options

SVGWIDTH= System Option



Specifies the width of the viewport unless the SVG output is embedded in another SVG output; specifies the value of the width attribute in the outermost <svg> element in the SVG file.
Valid in: configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Log and procedure output control: SVG
PROC OPTIONS GROUP= SVG
Restriction: The SVGWIDTH= option sets the width attribute only on the outermost <svg> element.

Syntax
Syntax Description
Details
Examples
See Also

Syntax

SVGWIDTH= number-of-units<unit-of-measure> | "" | "


Syntax Description

number-of-units

specifies the width as a number of unit-of-measure.

Requirement: number-of- units must be a positive integer value.
Interaction: If number-of- units is a negative number, the SVG document is not rendered by the browser.
unit-of-measure

specifies the unit of measurement, which can be one of the following:

%

percentage

cm

centimeters

em

the height of the element's font

ex

the height of the letter x

in

inches

mm

millimeters

pc

picas

pt

points

px

pixels

Default: px
"" | "

specifies to reset the width to the default value of 800 pixels.

Requirement: Use two double quotation marks or two single quotation marks with no space between them.

Details

For embedded <svg> elements, the SVGWIDTH= option specifies the width of the rectangular region into which the <svg> element is placed. The SVG output is scaled to fit the viewBox if SVGWIDTH="100%".

If the SVGWIDTH= option is not specified, the width attribute on the <svg> element is not set, which effectively provides full scalability by using a width of 100%.

The value for the SVGWIDTH= option can be specified without delimiters, enclosed in single or double quotation marks, or enclosed in parentheses.


Examples

The following OPTIONS statement specifies to size the SVG output to portrait letter-sized and to scale the output to 100% of the viewport:

options printerpath=svg orientation=portrait svgheight="100%" svgwidth="100%" 
        papersize=letter;

By using these option values, SAS creates the following <svg> element:

<svg> xmlns="http://www.w3.org/2000/svg" 
      xmlns:xlink="http://www.w3.org/1999/xlink" 
      xml:space="preserve" 
      onload='Init(evt)' version="1.1" 
      width="100%" height="100%" 
      viewBox="0 0 850 1100" 
</svg>

The value of "100%" in the SVGWIDTH= option specifies to scale the SVG output width to 100% of the viewport, which is based on the value of the PAPERSIZE= option. The paper size is letter in the portrait orientation, which has a width of 8.5" at 96 dpi.


See Also

System options:

SVGCONTROLBUTTONS

SVGHEIGHT= System Option

SVGPRESERVEASPECTRATIO= System Option

SVGTITLE= System Option

SVGVIEWBOX= System Option

SVGX= System Option

SVGY= System Option

Using SAS System Options

The SAS Registry in SAS Language Reference: Concepts

Creating Scalable Vector Graphics Using Universal Printing in SAS Language Reference: Concepts

Previous Page | Next Page | Top of Page