Fork of Vega-Lite API Template
✓ Published0🌍 Public
This example shows the relationship between a car’s fuel efficiency (miles per gallon) and its horsepower, colored by country of origin, using a scatter plot rendered with the Vega-Lite API in a D3.js environment. It loads auto-mpg data from a CSV via `d3.csv`, then builds the visualization declaratively with `vl.markCircle` and encodings for `x` (mpg), `y` (horsepower), `color` (origin), and a tooltip for the car’s name. The chart resizes to fill the browser window and applies custom axis and label styling from a shared configuration object.
AI-generated descriptionA visualization constructed using the vega-lite-api.
MIT Licensed