<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
{{js_scripts}}
</head>
<body>
<div>
<div id="plotly-html-element" hidden></div>
<img class="plotly-img-element" id="plotly-img-element"></img>
<script type="module">
const graph_div = document.getElementById("plotly-html-element");
await Plotly.newPlot(graph_div, {{ plot|tojson|safe }});
const img_element = document.getElementById("plotly-img-element");
const data_url = await Plotly.toImage(
graph_div,
{
format: "{{ format }}",
width: {{ width }},
height: {{ height }},
}
);
img_element.setAttribute("src", data_url);
</script>
</div>
</body>
</html>