I'd like to load the API on-demand in a ReactJS component, so I'm using script.js as such:
const containerDiv = document.getElementById("tableau-container");
const url = "http://MYURL.online.tableau.com/views/BOOKNAME/DASHBOARD";
const v = new window.tableau.Viz(containerDiv, url);
It does not seem like the API is actually loaded when the callback function executes. I get this error: `Uncaught TypeError: window.tableau.Viz is not a constructor`
Has anyone managed to successfully do something like this?
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...