Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

arvind1494
Valued Contributor

Size of qlik sense object (Width and height)

Hi Community,

Is their any way to find out height and width of qlik sense object using API provided by qlik sense.

Tags (1)
4 Replies
vikraant
Contributor

Re: Size of qlik sense object (Width and height)

Hi Arvind,

Could you please specify where you want to use this exactly?

If you are calling the object for a mashup, then you can use qlik.app.getObject method. You can use this method to insert the object into an HTML element. After that you can resize the element as you want using the element attributes.

Highlighted
arvind1494
Valued Contributor

Re: Size of qlik sense object (Width and height)

qlik.app.getobject()  will return promise object ....but i am unable to find size parameters..

I want to download image of qlik object in its original size..

In mashup i need to specify size of  html element to fix qlik charts.

If I get success to fetch its width and height then i will use the same while generating its image.

erik_wetterberg
Honored Contributor

Re: Size of qlik sense object (Width and height)

Hi,

Qlik Sense objects are responsive and adjust to the size given to them, so they don’t have a fixed size. To get their size in an actual page you can use standard JavaScript calls.

Erik Wetterberg

Extending Qlik – Use Qlik in your own apps and sites

Erik Wetterberg
https://extendingqlik.upper88.com/
vikraant
Contributor

Re: Size of qlik sense object (Width and height)

Hi,

If you are using older versions(<=June 2018)  of Qlik Sense then you will first have to embed the object into an HTML element, then define the height and width. After that you can export the image using following module.

Capturing Image of Qlik Sense Objects in Mashups

Otherwise, if you are using September 2018, you can use qlik.app.visualization.exportImg .  Here you can define height and width as per your requirements.

https://help.qlik.com/en-US/sense-developer/September2018/Subsystems/APIs/Content/Sense_ClientAPIs/C...