<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<title>My test page</title>
<meta name="viewport" content="width=device-width" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>Package management basics / notebook
Package management basics
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
import Plotly from "plotly.js-dist-min";
const root = document.getElementById("root");
Plotly.newPlot(
root,
[
{
x: [1, 2, 3, 4, 5],
y: [1, 2, 4, 8, 16],
},
],
{
margin: { t: 0 },
},
);