Refresh Data in the HTML Page for Embedded Oracle Analytics Content
In the HTML page where you're embedding Oracle Analytics content, you can specify how to refresh the embedded workbook's data.
To refresh data without reloading a workbook, the refreshData function is available on each <oracle-dv> element. Calling this function refreshes all visualizations under that element.
In this example, all instances of project refer to workbook.
<oracle-dv
id="project1"
project-path="{{projectPath}}">
</oracle-dv>
<script>
function refreshProject() {
const embeddedWorkbook = document.querySelector("#project1");
if (embeddedWorkbook) {
embeddedWorkbook.refreshData();
}
}
</script>
This is the code to refresh data for multiple embedded workbooks. In this code, all instances of project refer to workbook.
<script>
function refreshAllProjects() {
document.querySelectorAll("oracle-dv").forEach((embeddedWorkbook) => {
embeddedWorkbook.refreshData();
});
}
</script>