1 Reply Latest reply on Apr 11, 2016 7:51 AM by Robert Yu

    Tableau API: Delete Viz

    Robert Yu

      So I feel like this is a really easy question but I'm missing it.

       

      I have a viz:

       viz = new tableauSoftware.Viz(vizDiv, vizURL, options)
      

       

      I would like to have a button to remove the viz, and then another button to add it again.

       

      My current solution to remove the viz is to remove the iframe:

      d3.select("#viz").select("iframe").remove()
      

       

      However, when I try to re-add the viz:

      viz = new tableauSoftware.Viz(vizDiv, vizURL, options)
      

         I receive the error

      uncaught exception: [object, object].
      

       

      Does anyone know how to properly remove the viz so I can re add it?

       

      Thank you