Skip to main content
100%

Vega-lite

✓ Published1🌍 Public
RRoland
Last edited Feb 5, 2022
Created on Feb 5, 2022
Forked from Mouse Follower

This example visualizes the relationship between vehicle weight, horsepower, and fuel efficiency (mpg) in a scatterplot. It uses the Vega-Lite API to declare point marks with multiple encodings—x maps to weight, y maps to horsepower, while color, size, and opacity encode additional quantitative fields. The code registers Vega-Lite with Vega and integrates React for rendering, loading data via `d3.csv` from an external auto-mpg dataset. Tooltips are enabled through the `vega-tooltip` Handler, and the chart auto-fits to the window dimensions.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes