1 2 3 Previous Next 40 Replies Latest reply on Nov 3, 2015 2:44 PM by Stephen Hellyar

    Embed with API and set Dimensions with Percentages

    Stephen Hellyar



      I am trying to use a % for width and height.  I've tried 100%, 90%, 50%, etc.  No matter what I do, the dashboards pops up as a small postage stamps.  The source dashboard is set to automatic (or alternatively to 900x700), but it still renders as a small rectangle when I try using a percentage for W and H.  

      Here is my embed code.

      window.onload=function() {

        var vizDiv = document.getElementById('viz');

        var vizURL = 'https://10az.online.tableau.com';

        var options = {

        width: "50%",

        height: "50%",

        hideTabs: true,

        hideToolbar: true,

        onFirstInteractive: function() { //The Viz is now ready and can be safely used.

        workbook = viz.getWorkbook();

        document.getElementById('sheetName').innerHTML = viz.getWorkbook().getActiveSheet().getName();



        viz=new tableau.Viz(vizDiv,vizURL, options);


        1 2 3 Previous Next