<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can you tell when all objects in a Mashup have loaded? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/2073056#M18575</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I am a bit confused by this.&lt;/P&gt;
&lt;P&gt;In one snippet you call "app.getObject()" to render the chart.&lt;BR /&gt;In the other snippet you call "vis.show()".&lt;/P&gt;
&lt;P&gt;For me, "app.getObject()" does cause the chart to be rendered, but the events on "rendered" are not triggered.&lt;/P&gt;
&lt;P&gt;So what is the difference or relationship between app.getObject() and vis.show()?&lt;BR /&gt;Is one included in the other?&lt;BR /&gt;What happens if I call both?&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 22:22:31 GMT</pubDate>
    <dc:creator>donquixote</dc:creator>
    <dc:date>2023-05-18T22:22:31Z</dc:date>
    <item>
      <title>How can you tell when all objects in a Mashup have loaded?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/1646851#M11796</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have a mashup which displays a couple of simple KPI's and charts, but it can take a second or two to load. What I've added is a pulsing company logo on the screen that is hidden once all data is loaded.&lt;/P&gt;&lt;P&gt;However using&amp;nbsp;&lt;FONT color="#999999"&gt;$(document).ready(function()&lt;/FONT&gt; or&amp;nbsp;&lt;FONT color="#999999"&gt;window.onload function()&lt;/FONT&gt; fires as soon as the page is built but still waits a second or two for the object data to be pulled. I'm using&amp;nbsp;&lt;FONT color="#999999"&gt;app.getObject(&lt;/FONT&gt; method to retrieve the object from the app.&lt;/P&gt;&lt;P&gt;Does anyone have any suggestions on how I can check that an object has loaded, as in pulled data and presenting it to the user so I can then fire the change to hide the pulsing logo?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:07:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/1646851#M11796</guid>
      <dc:creator>Daniel1</dc:creator>
      <dc:date>2024-11-16T04:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can you tell when all objects in a Mashup have loaded?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/1646952#M11798</link>
      <description>&lt;P&gt;Update: I've found that applying the change after calling for the object is &lt;EM&gt;slightly&lt;/EM&gt; better, but there is still lag between this and the object actually being rendered for the user to see.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;		app.getObject('QVobject-1','xxxxx').then( function ( model ) {
					    document.body.className = "loaded"
				  });&lt;/LI-CODE&gt;&lt;P&gt;Would love to know how I can check once all objects are loaded!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 13:22:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/1646952#M11798</guid>
      <dc:creator>Daniel1</dc:creator>
      <dc:date>2019-11-14T13:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can you tell when all objects in a Mashup have loaded?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/1646987#M11800</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;There is two things here,&amp;nbsp;&lt;BR /&gt;One is if u want to know if all objects fisnihed loading - ie all app.getObject are resolved. this is u can do in js by storing all the promises and check if all are resolved. or u can also load the objects in sequence:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.getObject('QVobject-1','xxxxx').then( function ( model ) {
    app.getObject('QVobject-2','xxxxx').then( function ( model ) {
       app.getObject('QVobject-3','xxxxx').then( function ( model ) {
					    document.body.className = "loaded"
       })
    })
 });&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;but the other issue is that app.getobject is resolved when the the data has loaded, but not when the chart is rendedred, so on slow devices the time difference can be noticed.&lt;BR /&gt;I did find a way to see when the chart has finished rendering (but i don't think it is documented, so use on your own risk):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.visualization.get('xxxxx').then(function (vis) { 
    vis.show("QVobject-1", { noSelections: true }); 
    vis.rendered.promise.then(function () { 
        console.log('Chart Rendered!'); 
    }); 
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 13:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/1646987#M11800</guid>
      <dc:creator>oz_moyal</dc:creator>
      <dc:date>2019-11-14T13:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can you tell when all objects in a Mashup have loaded?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/1647906#M11823</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/9886"&gt;@oz_moyal&lt;/a&gt;&amp;nbsp;, the chaining looks to be a good solution - currently I just took to the slowest one and used that but think it would be good to check them all.&lt;/P&gt;&lt;P&gt;It appears as though when using Chrome to throttle the connection it also slows down the rendering, but when using shared WiFi connections (like on a train) which are truly slow then waiting on the promise worked a treat.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 12:10:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/1647906#M11823</guid>
      <dc:creator>Daniel1</dc:creator>
      <dc:date>2019-11-18T12:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can you tell when all objects in a Mashup have loaded?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/2073056#M18575</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I am a bit confused by this.&lt;/P&gt;
&lt;P&gt;In one snippet you call "app.getObject()" to render the chart.&lt;BR /&gt;In the other snippet you call "vis.show()".&lt;/P&gt;
&lt;P&gt;For me, "app.getObject()" does cause the chart to be rendered, but the events on "rendered" are not triggered.&lt;/P&gt;
&lt;P&gt;So what is the difference or relationship between app.getObject() and vis.show()?&lt;BR /&gt;Is one included in the other?&lt;BR /&gt;What happens if I call both?&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 22:22:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/2073056#M18575</guid>
      <dc:creator>donquixote</dc:creator>
      <dc:date>2023-05-18T22:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can you tell when all objects in a Mashup have loaded?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/2073777#M18580</link>
      <description>&lt;P&gt;getObject and visualization.get basically have the same goal, render an object, but they are separates methods.&lt;/P&gt;
&lt;P&gt;With getObject you can direclty render an object into your HTML.&lt;/P&gt;
&lt;P&gt;With visualization.get you can apply custom configuration to your chart before render, such as showTitle (you can hide titles before rendering). &lt;A href="https://help.qlik.com/en-US/sense-developer/May2023/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/VisualizationAPI/options.htm" target="_self"&gt;Here&lt;/A&gt; all the options available for each chart.&lt;/P&gt;
&lt;P&gt;You should never use both at the same time for the same object, this could cause a double request to the engine for the same object and the double use of engine resource.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 10:47:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-can-you-tell-when-all-objects-in-a-Mashup-have-loaded/m-p/2073777#M18580</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2023-05-22T10:47:58Z</dc:date>
    </item>
  </channel>
</rss>

