1 Reply Latest reply on Jun 12, 2018 4:49 PM by Man Tsui

    Embedding Views using JavaScript API

    julian grace

      Is there a way to open an embeded viz page in full screen mode in Tableau when page loads? I can embed a viz to my html page like this sample.

       

      function initializeViz() { // JS object that points at empty div in the html var placeholderDiv = document.getElementById("tableauViz"); // URL of the viz to be embedded var url = "http://public.tableau.com/views/WorldIndicators/GDPpercapita"; // An object that contains options specifying how to embed the viz var options = { width: '100%', height: '100%', hideTabs: true, hideToolbar: true, }; viz = new tableau.Viz(placeholderDiv, url, options); } 

       

        • 1. Re: Embedding Views using JavaScript API
          Man Tsui

          Hi Julian,

           

          In my experience, I think explicitly defining width and explicitly defining your html embed code is the most straightforward solution.

          Simultaneously, you have to set define your width and height for the dashboard in your workbook similarly. 

          Under this method: don't use  width: '100%', height: '100%'

           

          I hope that helps answer you question.

           

          var options = {
             width: '600px',
             height: '600px',
             hideTabs: true,
             hideToolbar: true,
            };