Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

698
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda