11. Vega-Lite API
✓ Published0🌍 Public
This example demonstrates how to build an interactive scatter plot using the Vega-Lite API, visualizing automobile data from a CSV file. The plot displays fuel efficiency (mpg) on the x-axis and horsepower on the y-axis, with circles colored by country of origin, sized by horsepower, and showing tooltips with car names on hover. The code uses the `vl` API from `vega-lite-api` to construct the visualization declaratively, registers it with `vega` and `vega-lite`, and loads data via `d3.csv`. The chart fits the full window with a custom dark-themed configuration, using SVG rendering and the `vega-tooltip` handler.
AI-generated descriptionA visualization constructed using the vega-lite-api.
MIT Licensed