A Pen by Andre de Vries on CodePen.
Created
October 12, 2018 14:49
-
-
Save andre347/4605eb9f887329052316162f8c8c7b79 to your computer and use it in GitHub Desktop.
Tableau Extension: Step 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Data-Refresh Tableau</title> | |
</head> | |
<body> | |
<h1>Hello Tableau!</h1> | |
<script src="js/tableau-extensions-1.latest.min.js"></script> | |
<script src="js/app.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When the DOM has load, run the function load | |
document.addEventListener("DOMContentLoaded", load); | |
function load() { | |
//initialise the tableau object, wait for the promise to return and grab the name of the dashboard | |
tableau.extensions.initializeAsync().then(() => { | |
const dashboard = tableau.extensions.dashboardContent.dashboard; | |
console.log(dashboard.name); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment