Skip to content

Instantly share code, notes, and snippets.

@skylarking85
Last active May 12, 2017 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skylarking85/211017856bbdf3f3e077ec3bab310486 to your computer and use it in GitHub Desktop.
Save skylarking85/211017856bbdf3f3e077ec3bab310486 to your computer and use it in GitHub Desktop.
Tableau Publicで作成したVizを任意のページに呼び出すjs API
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>tableau js API test</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="//online.tableau.com/javascripts/api/tableau-2.0.0.min.js"></script>
<script type="text/javascript">
var viz;
var sheet;
var current_sheet;
function initViz() {
var placeholderDiv = $("#tableau-root");
var url = 'https://public.tableau.com/views/pokemon_28/dashboard';
options = {
width: "1400px",
height: "600px",
hideTabs: true,
hideToolbar: true
};
viz = new tableau.Viz(placeholderDiv, url, options);
}
</script>
</head>
<body onload="initViz();">
<div id="tableau-root"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment