Vega-Lite API Example
This example demonstrates a line chart visualizing numerical values over time, with data sourced from an Auto MPG dataset and individual time-stamped observations. The visualization is constructed programmatically using the `vega-lite-api`, which provides a fluent JavaScript interface for defining Vega-Lite specifications. After fetching data using the `json` function from `d3`, the chart is rendered as an SVG through the `vega` and `vega-lite` libraries, with a custom tooltip handler integrated for interactive exploration. The chart is configured to fit the window size, and styling is adjusted for readability.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The data shown here comes from the UCI Machine Learning Repository: Auto MPG Data Set, via Gist: Scatter Plot with Menus.