exportImg method

Note: STABLE.
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:

  • PNG
  • JPG

Default is JPG.

Returns

A promise of a link to the exported file.

Example

var element = document.getElementById('QV01');
var settings = { format: 'png', height: element.offsetHeight, width: element.offsetWidth }

visualization.exportImg(settings)
.then(function (result) {
  console.log('Image download link: ', result);
});

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?