ChartDirector 6.0 (Ruby Edition)

BaseChart.setOutputOptions


Usage

setOutputOptions(options)

Description

Sets output format options for the next chart output. Currently, only SVG, SVGZ and PDF output formats support output options.

An output option can be a flag (such as "compress") or an attribute-value pair (such as "width=800"). Multiple output options can be joined using semicolons as delimiters.

SVG Options
SVG OptionTypeDescription
compressFlag Compressed the SVG, that is, output SVGZ.
bitmapFlag Render the chart as a bitmap and output the bitmap as SVG.
noxmldeclFlag Do not include the xml declaration line "<?xml version="1.0" .... >" in the SVG.
nodoctypeFlag Do not include the document type declaration line "<!DOCTYPE svg PUBLIC .... >" in the SVG.
widthFlag / Attribute Specifies the width attribute of the SVG.

By default, ChartDirector will not include the width or height attribute in the SVG output. In this case, the SVG is variable in size and would assume the size of its container. For example, if the SVG is inside a <DIV> block in a web page, it will assume the size of the DIV block.

If the "width" option is used as a flag, ChartDirector will include the width attribute in the SVG and set it to the chart width. If the "width" option is used as an attribute (such as "width=800"), ChartDirector will include the width attribute in the SVG and set it to the specified value. The specified value should be some text that is valid as SVG width. Examples are "100" and "75%".
heightFlag / Attribute Specifies the height attribute of the SVG. See the description on "width" above on how to use it.

PDF Options
PDF OptionTypeDescription
bitmapFlag Render the chart as a bitmap and output the bitmap as PDF.
widthAttribute The width of the chart in the PDF in pixel unit.

By default, ChartDirector will use the pixel width of the chart as the width of the chart in PDF. The "width" attribute can be used to specify an alternative value. The value must be a number.
heightAttribute The width of the chart in the PDF in pixel unit.

See the description on "width" above for how to use it.
pagewidthAttribute The page width in pixel unit.

By default, ChartDirector will set the page width to the same width as the chart. The "pagewidth" attribute can be used to specify an alternative value. The value must be a number.
pageheightAttribute The page height in pixel unit.

By default, ChartDirector will set the page height to the same height as the chart. The "pageheight" attribute can be used to specify an alternative value. The value must be a number.
leftxAttribute The x coordinate of the left side of the chart within the page in pixel unit.

By default, ChartDirector will center the chart in the page. The "leftx" attribute can be used to specify an alternative horizontal position. The coordinate must be a number.
topyAttribute The y coordinate of the top side of the chart within the page in pixel unit.

By default, ChartDirector will center the chart in the page. The "topy" attribute can be used to specify an alternative vertical position. The coordinate must be a number.
dpiAttribute Specify the factor for conversion from pixel to physical unit.

The PDF viewer will convert the pixel unit into physical unit (eg. inches) so that it can be layout on paper or other physical media. The default conversion factor for the chart is 96 pixels per inch. The "dpi" attribute can be used to specify an alternative value. The value must be a number.

Arguments

ArgumentDefaultDescription
options(Mandatory)A list of options delimited by semicolons.

Return Value

None