[Vega-Lite] 3.2 Line Chart
✓ Published0🌍 Public
This example shows a simple line chart of the S&P 500 index over time, plotting price against date. The visualization uses a Vega-Lite specification (version 5) loaded from an external JSON file, with data sourced from a GitHub-hosted CSV (sp500.csv). The chart is rendered in an HTML page via the Vega-Embed JavaScript library, which pulls in Vega and Vega-Lite at runtime. The code defines the mark as a line and encodes the x-axis as temporal (date) and the y-axis as quantitative (price), with a fixed width of 360 pixels.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed