-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTableau_on_Page.html
More file actions
73 lines (60 loc) · 2.48 KB
/
Tableau_on_Page.html
File metadata and controls
73 lines (60 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<html>
<head>
<link type="text/css" rel="stylesheet" href="http://onlinehelp.tableau.com/samples/en-us/js_api/css/smoothness/jquery-ui-1.10.0.custom.css">
<link type="text/css" rel="stylesheet" href="http://onlinehelp.tableau.com/samples/en-us/js_api/css/Modern.css">
<link type="text/css" rel="stylesheet" href="http://onlinehelp.tableau.com/samples/en-us/js_api/css/tutorial.css">
<script type="text/javascript" src="http://onlinehelp.tableau.com/samples/en-us/js_api/jquery-1.9.1.js"></script>
<script type="text/javascript" src="http://onlinehelp.tableau.com/samples/en-us/js_api/jquery-ui-1.10.0.custom.js"></script>
<script type="text/javascript" src="http://public.tableau.com/javascripts/api/tableau-2.0.0.min.js"></script>
<script type="text/javascript" src="http://onlinehelp.tableau.com/samples/en-us/js_api/tutorial.js"></script>
<script type="text/javascript">
var viz, workbook, activeSheet;
/*********************
function initializeVis() {
var placeholderDiv = document.getElementById("tableauViz");
var url = "http://public.tableau.com/views/WorldIndicators/GDPpercapita";
var options = {
width: placeholderDiv.offsetWidth,
height: placeholderDiv.offsetHeight,
hideTabs:false,
hideToolbar:false,
onFirstInteractive: function() {
workbook = viz.getWorkbook();
activeSheet = workbook.getActiveSheet();
viz = new tableau.Viz(placeholderDiv, url, options);
}
}
};
*************************************/
/*****************************************************/
function initializeViz() {
var placeholderDiv = document.getElementById("tableauViz");
var url = "http://public.tableau.com/views/WorldIndicators/GDPpercapita";
var options = {
width: placeholderDiv.offsetWidth,
height: placeholderDiv.offsetHeight,
hideTabs: false,
hideToolbar: false,
onFirstInteractive: function () {
workbook = viz.getWorkbook();
activeSheet = workbook.getActiveSheet();
viz = new tableau.Viz(placeholderDiv, url, options);
}
}
}
function filterSingleValue() {
activeSheet.applyFilterAsync(
"Region",
"The Americas",
tableau.FilterUpdateType.REPLACE);
}
$(document).ready(function() {
$(initializeViz)
$('#tableauViz').html(viz);
});
</script>
</head>
<body>
<div id="tableauViz"></div>
</body>
</html>