Configuration

An object configuring options for the dxExport widget.

exportFormat

Specifies a set of formats available for exporting into.

Type:

Array

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

By default, you can export your widget into three formats: PNG, PDF and SVG. If you need to alter this set, assign an array of the required formats to the exportFormat option.

fileName

Specifies a name that should be assigned to the file with the exported widget.

Type:

String

Default Value: 'file'

onDisposing

A handler for the disposing event.

Type:

function

Function parameters:
e:

Object

Provides function parameters.

Object structure:
component:

Object

Provides access to the widget instance.

Default Value: null

Assign a function to perform a custom action when the widget is being removed.

NOTE
The function assigned to this option is executed only if the widget is removed using the remove(), empty(), or html() jQuery methods.

onInitialized

A handler for the initialized event.

Type:

function

Function parameters:
e:

Object

Provides function parameters.

Object structure:
component:

Object

Provides access to the widget instance.

element:

jQuery

An HTML element of the widget.

Default Value: null

Assign a function to perform a custom action when the widget is initialized.

onOptionChanged

A handler for the optionChanged event.

Type:

function

Function parameters:
e:

Object

Provides function parameters.

Object structure:
component:

Object

Provides access to the widget instance.

name:

String

Specifies the name of the option whose value is changed.

fullName:

String

Specifies a full name of the option whose value is changed. The full name is formed by concatenating the names of the options that are presented in the hierarchy of the given option. The names are delimited by commas.

value: any

Specifies a new value for the option.

Default Value: null

Assign a function to perform a custom action after an option of the component is changed.

printingEnabled

Specifies whether or not to enable printing operation.

Type:

Boolean

Default Value: true

When this option is set to true, the printing icon is displayed making the printing operation available. Otherwise, this icon is concealed.

serverUrl

Specifies the URL of the server that supplies the exporting service.

Type:

String

Default Value: undefined

Learn how to set the server side up for exporting in our Deploy a Server topic.

showMenu

Specifies whether to show the export menu or not.

Type:

Boolean

Default Value: true

This option hides the export menu entirely. To hide only the printing icon, use the printingEnabled option.

sourceContainer

Specifies a div container that holds the widget to be exported.

Type:

String

Default Value: undefined

Every DevExtreme data visualization widget is created inside a div container. In order to export the widget from this container, assign one of the jQuery selectors to the sourceContainer option. For example, if a chart is placed in a div container that has the 'id' attribute set to 'chartContainer', you can specify the sourceContainer option using the ID selector as follows.

JavaScript
$('#exporterConainter').dxExporter({
    // ...
    sourceContainer: '#chartContainer'
});
NOTE
If several containers match the utilized selector, only a widget from the first container will be exported.

To export more than one widget into a single document, put these widgets into a div container and pass that container to the exporter.

HTML
<div id="charts">
    <div id="chartA"></div>
    <div id="chartB"></div>
</div>
JavaScript
$('#exporterConainter').dxExporter({
    // ...
    sourceContainer: '#charts'
});
NOTE
You cannot export several widgets into SVG format.