1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Vega-Embed for Vega-Lite</title>
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4"></script>
<script src="build/vega-embed.js"></script>
</head>
<body>
<div id="bind"></div>
<div id="vis"></div>
<script>
async function run() {
const result = await vegaEmbed("#vis", "examples/histogram.vg.json", {
bind: "#bind",
loader: { baseURL: "https://vega.github.io/vega/" },
});
}
run();
</script>
</body>
</html>
|