2 Replies Latest reply on Sep 18, 2018 9:20 PM by Man Tsui

    refreshDataAsync won't work right after viz creation

    Jacob Seymer

      I'm created an embed view on my page. I want to refresh the data right after I load it into the div. It doesn't refresh unless I add a delay between the viz creation and the refresh call. Can someone explain why this is the case, or suggest a better approach?

       

       

      //Doesn't work:

      viz1 = new tableauSoftware.Viz(div1, url, options); //div1, url, and options all are properly created above

      viz1.refreshDataAsync();

       

      //Works:

      viz1 = new tableauSoftware.Viz(div1, url, options);  //div1, url, and options all are properly created above

       

      setTimeout(function() {

           viz1.refreshDataAsync();

      }, 5000);