jQuery RangeSelector - export

Configures the exporting and printing features.

Type: viz/core/base_widget:BaseWidgetExport

These features allow a user to export your UI component into a document or print it. When exporting is enabled, the "Exporting/Printing" button appears in the UI component. A click on it invokes a drop-down menu that lists exporting and printing commands. The following formats are supported for exporting into: PNG, PDF, JPEG, SVG and GIF.

See Also

backgroundColor

Specifies the color that will fill transparent regions in the resulting file or document.

Type:

String

Default Value: '#ffffff'

This property supports the following colors:

enabled

Enables the client-side exporting in the UI component.

Type:

Boolean

Default Value: false

fileName

Specifies a default name for the file to which the UI component will be exported.

Type:

String

Default Value: 'file'

formats

Specifies a set of export formats.

Default Value: ['PNG', 'PDF', 'JPEG', 'SVG', 'GIF']

NOTE
If the browser does not support exporting to a specific format, the format is excluded from the exporting menu when the UI component is viewed in this browser.

margin

Adds an empty space around the exported UI component; measured in pixels.

Type:

Number

Default Value: 10

printingEnabled

Enables the printing feature in the UI component. Applies only if the export.enabled property is true.

Type:

Boolean

Default Value: true

When printing is enabled, the export menu contains an item that invokes the Print window of the user's browser. It lets the user to select preferred printing properties and to send the print job to the printer.

svgToCanvas

A function that renders SVG markup on the HTML canvas. Required to export custom SVG elements (for example, markerTemplate).

Type:

Function

Function parameters:

An SVG element that will be parsed.

A container where the content of the SVG element is drawn.

Return Value:

Promise<void> (jQuery or native)

A Promise that is resolved after the HTML canvas content is rendered.

Default Value: undefined