Created
February 28, 2020 01:31
-
-
Save fideliocc/a06c9654e6eae0c5743a99bfb94da0b5 to your computer and use it in GitHub Desktop.
A function to use amazon-quicksight-embedding-sdk to embed a ready QuickSight dashboard in an Angular 8 app component
This file contains hidden or 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
this.auth.getDashboardUrl() | |
.subscribe(url => { | |
console.log(url['payload'].EmbedUrl); | |
const embedUrl = url['payload'].EmbedUrl; | |
const options = { | |
url: embedUrl, | |
container: document.getElementById('dashboardContainer'), | |
parameters: { | |
country: 'Ecuador' | |
}, | |
scrolling: 'no', | |
height: 'AutoFit', | |
width: '100%' | |
}; | |
const dashboard = QuicksightEmbedding.embedDashboard(options); | |
dashboard.on('error', onError); | |
dashboard.on('load', onDashboardLoad); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment