🌍 Public
[Vega-Lite] 3.2 Line Chart with .csv
This example shows a line chart of monthly S&P 500 prices from 2000 to 2010, with date on the x-axis and price on the y-axis. The visualization loads a CSV file, `sp500.csv`, and renders it using Vega-Lite’s `mark` type. The chart is embedded in an HTML page via `vegaEmbed`, which uses the `vega` and `vega-lite` libraries to parse the specification in `line.vl.json`. The encoding maps the temporal `date` field and quantitative `price` field to the axes, producing a simple trend line.
AI-generated descriptionMIT Licensed
![[Vega-Lite] 3.2 Line Chart all in HTML](/viz/3f6f8932c3ba42939aa70bc07b5da1ee/social-image.png?v=7ed43c3ad912485490938ca19f97f0f0)
![[Vega-Lite] 3.2 Line Chart](/viz/56c09f3cf1c14b61bde137530cc99256/social-image.png?v=e326c9e1281f4b76b4a9e7ef897c3890)
![[Vega-Lite] 3.2 Line Chart](/viz/9e059a347e544f90b43daaaf5aa6cee3/social-image.png?v=053839e3d3114a1b90422063fb23bff5)
![[Vega-Lite] 3.2 Line Chart](/viz/5d66fff1d0cb472291ec94af10c69117/social-image.png?v=42b5e437792843c48070da7bd395922d)
![[Vega-Lite] 3.2 Line Chart](/viz/e58780a7ae934db39105008748555d89/social-image.png?v=4ec95a144ace463aa0bdc9559984951c)
![[Vega-Lite] 3.2 Line Chart](/viz/81c0c20a30d141fd8018088d53517a65/social-image.png?v=8a4a34b296f2471c80f1de152ae0a23d)
![[Vega-Lite] 3.2 Line Chart](/viz/9d29d7728d8344d5abc5e2039f22d5c3/social-image.png?v=eb83357be732420688cbd7151e63f6fe)
![Fork of [Vega-Lite] 3.2 Line Chart](/viz/60b98c5563ac4cc4b41a79f34ac36550/social-image.png?v=28f90c8160954a3cbc3ab7a140d5c6f0)
Comments
Sign in to join the discussion.