Select to view content in your preferred language

Embed dashboard in custom web page

255
1
04-10-2023 09:55 AM
Hectorleo18
New Contributor

 

Hello. I'm just starting with ArcGIS JavaScript and I want to know if is possible embed a dashboard saved in ArcGIS Online like embed a Map saved in ArcGIS Online. Is there something like this: 

const webMap = new WebMap({
  portalItem: {
    id: Id,
    portal: {
      url: "https://www.arcgis.com"
    }
  }
});
const view = new MapView({
  map: webMap,
  container: "viewDiv"
});

 but to display dashboards?

Thanks in advance.

0 Kudos
1 Reply
RamaniGanason
New Contributor III

I think maybe you can use iframe with the link to the dashboard. I do not see any SDK currently available to embed ArcGIS Dashboard.

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Page Title</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
</style>
<body>
<iframe src="https://www.arcgis.com/apps/dashboards/<dashboard id>" title="Dashboard"></iframe>
</body>
</html>
0 Kudos