开发测试
JavaScript API Tutorial
Basic Embed Tableau JS API嵌入
function initializeViz() {
var placeholderDiv = document.getElementById(“tableauViz”);
var url = “https://public.tableau.com/views/WorldIndicators/GDPpercapita”;
//options = {
// hideTabs: true,
// onFirstInteractive: function () {
// console.log(“Run this code when the viz has finished loading.”);
}
//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);
}
Basic Embed Tableau JS API嵌入
Basic Embed Tableau JS API嵌入
以下使用了 vizContainer引用了tableau public 视图: