Vue Exporter Props

An object configuring options for the Exporter widget.

exportFormat

Specifies a set of formats available for exporting into.

Type:

Array<String>

Default Value: ['PDF', 'PNG', 'SVG']
Accepted Values: 'GIF' | 'JPEG' | 'PDF' | 'PNG' | '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 function that is executed before the widget is disposed of.

Type:

Function

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Exporter

The widget's instance.

Default Value: null

onInitialized

A function that is executed only once, after the widget is initialized.

Type:

Function

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Exporter

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

Default Value: null

You cannot access widget elements in this function because it is executed before they are ready.

onOptionChanged

A function that is executed after a widget option is changed.

Type:

Function

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Exporter

The widget's instance.

name

String

The option's short name.

fullName

String

The option's full name. Contains a full hierarchy of the option.

value any

The option's new value.

Default Value: null

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 up the server side for exporting service 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
JavaScript
<div id="charts">
    <div id="chartA"></div>
    <div id="chartB"></div>
</div>
$('#exporterConainter').dxExporter({
    // ...
    sourceContainer: '#charts'
});
NOTE
You cannot export several widgets into SVG format.