ChartDirector 7.1 (C++ Edition)

DrawArea.setOutputOptions


Usage

void setOutputOptions(const char *options);

Description

Sets output format options for the next chart output.

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.

The available options depend on the output image type as follows.

Raster Image Options (PNG, JPG, GIF, BMP or desktop display output)
Raster Image OptionTypeDescription
bmpScaleAttribute Render the chart with a scale factor. For example, "bmpScale=1.5" means the chart size will be 1.5 times of the original. The supported bmpScale is 0.1 to 3.

SVG / SVGZ Options
SVG OptionTypeDescription
compressFlag Compressed the SVG, that is, output SVGZ.
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
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