exportImg method
Information noteSTABLE.
This API is reliable and breaking changes are unlikely.
This API is reliable and breaking changes are unlikely.
qlik.app.visualization.exportImg(settings)
Exports a QVisualization instance to an image.
Version history
Introduced | Qlik Sense September 2018 |
Parameters
settings
Type: Object
Image export settings.
Properties
Name | Type | Description |
---|---|---|
height | Number | String |
Output height in pixels. |
width | Number | String |
Output width in pixels. |
format | String |
The image type the visualization should be exported to. Can be one of:
Default is JPG. |
Returns
A promise of a link to the exported file.
Example
var settings = { format: 'png', height: element.offsetHeight, width: element.offsetWidth }
var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d', config);
app.visualization.get('xGhjKl').then(function(vis){
vis.exportImg(settings).then(function (result) {
console.log('Image download link: ', result);
});
});