I am trying to embed an Altair data visualization I created in Python, into an html document. I have followed the instructions on https://altair-viz.github.io/user_guide/saving_charts.html, specifically the json/VegaEmbed method. The following is my code for the html so far:
<!DOCTYPE html>
<html>
<head>
<style>
.error {
color: red;
}
</style>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vega-lite@5"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>
</head>
<body>
<h1>Altair Embed Demo</h1>
<div id="vis"></div>
<script>
vegaEmbed('#vis', 'C:/Users/myName/chart.json');
</script>
</body>
</html>
As can be seen here, the Altair visualization is saved as chart.json locally, and I am calling the vegaEmbed module on it.
However, the issue I'm having is that the resulting page does not output the Altair visualization. My path is correct, I have imported the correct module, and I have used vegaEmbed() properly (I think). Could someone give me guidance on this issue if they have had experience with Vega/Altair? Thank you.