Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

692
Vistas
Tableau viz.dispose() Not working - Another viz is already present in element

I am using tableau javascript api to embed tableau dashboards in my webpage. I am trying to dynamically load dashboards in a div according to the user's choice. I am referring official tableau documentaion for the purpose. But while after loading a viz, when I am trying to load another viz in that same div, I am getting a error like this.

Another viz is already present in element

I found a solution in tableau community itself.

https://community.tableau.com/s/question/0D54T00000C5ja9/another-viz-is-already-present-in-element-divtableauviz-error

But I cant use this dispose method. It is not working for me.

initDash() {
var viz, containerDiv, url, options;
containerDiv = document.getElementById("vizContainer");
url = "https://SampleURL";
options = {
  hideTabs: true,
  height: '100vh',
  width: '100vw',
  onFirstInteractive: function () {
    console.log("Run this code when the viz has finished loading.");
  },
  onFirstVizSizeKnown: function () {
    console.log("Viz Size Loaded");
  }
};

loadViz(containerDiv, url, options);

function loadViz(containerDiv, url, options) {
  if(viz){
      viz.dispose();
         }
  viz = new tableau.Viz(containerDiv, url, options);
}

}

Any Help would be thankful.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda