Exporter 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'

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.

sourceContainerId

Deprecated

Use the sourceContainer option instead.

Specifies the ID of the 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 the ID of this container preceded by the '#' symbol to the sourceContainerId option of the dxExporter's configuration object.