🌍 Public
[Vega-Lite] 3.1 HTML setup
This example shows a minimal HTML setup for embedding a Vega-Lite visualization, loading a specification from an external JSON file. The page includes a single `<div id="vis">` container and uses the Vega, Vega-Lite, and Vega-Embed libraries from a CDN. The `vegaEmbed` function attaches the chart defined in `line.vl.json` to that container, with errors logged to the console via `catch(console.warn)`. The code relies on standard HTML and JavaScript without any framework.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed
![[Vega-Lite] 3.1 HTML setup](/viz/3e3a58eba5f34f4699e73a31afb57ba2/social-image.png?v=842bf049265d40e49e791740c66d813b)
![[Vega-Lite] 3.1 HTML setup](/viz/b21cb24eb71e430a95c4acaf800b1132/social-image.png?v=cffe682f0d874b99b707b6726eec9915)
![[Vega-Lite] 3.1 HTML setup](/viz/7bfb1d170ff04abaa314e0f4f61c870c/social-image.png?v=641d508ee78045d199f5c064380659be)
![Fork of [Vega-Lite] 3.1 HTML setup](/viz/32df8e7cf79847ec8b9f66580dca8ba9/social-image.png?v=ff2988201f8f4c6e9715744df6be0065)

![[Vega-Lite] 3.1 HTML setup](/viz/d2e9defde5384516a19738f869ad708d/social-image.png?v=5cf2d4b67a3545e2a3c0fa1c1c492f80)


Comments
Sign in to join the discussion.