🌍 Public
Viewing a saved revision (read-only)
200c538cf5c747269995f6c7184d9fe9
Vega-Lite API Template
This example demonstrates how to use the Vega-Lite API to build a scatter plot of automobile data, showing the relationship between weight, horsepower, and fuel efficiency (mpg), with points colored by country of origin. The visualization leverages the vega-lite-api JavaScript library to construct the chart declaratively, then renders it using Vega and Vega-Lite with an SVG output. Data is loaded asynchronously from a CSV file using D3’s `csv` function. Custom styling is applied through a config object to adjust axis labels, fonts, and colors for improved readability.
AI-generated descriptionA visualization constructed using the vega-lite-api.