1 Reply Latest reply on Nov 30, 2016 2:39 PM by Santiago Sanchez

    Hide "share" option in Tableau view using Javascript API.

    Omkumar Kanojia

      I am using Tableau Desktop (Trail version) and publishing dashboard using Tableau Online feature for my POC project.

       

      I have a MVC application where I am embedding Tableau View using provided Javascript API method.


      Could anybody kindly let me know how do I hide share option in such a setup?

       

      Solution already tried by me:

      1. showshareoptions - Not Working

      2. display_share - Not Working

        • 1. Re: Hide "share" option in Tableau view using Javascript API.
          Santiago Sanchez

          Hi Omkumar,

           

          On your JavaScript code you can specify that the toolbar needs to be hidden:

           

          function initializeViz() {

            var placeholderDiv = document.getElementById("tableauViz");

            var url = "https://online.tableau.com/views/yourViz";

            var options = {

            width: placeholderDiv.offsetWidth,

            height: placeholderDiv.offsetHeight,

            hideTabs: true,

            hideToolbar: true,

            onFirstInteractive: function () {

            workbook = viz.getWorkbook();

            activeSheet = workbook.getActiveSheet();

            }

            };

            viz = new tableau.Viz(placeholderDiv, url, options);

          }

           

          If you are planning on allowing downloads, which would now be hidden too along the toolbar, you can use the JavaScript API to help.

           

          This is described on the JavaScript API Tutorial . In particular, look at tabs:

           

          1. Create

          7. Toolbar

           

          Hope this helps!

          1 of 1 people found this helpful