Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
Sseanmdalrymple@protonmail.com
Last edited Feb 10, 2025
Created on Feb 10, 2025

This example visualizes the relationship between car origin and horsepower using a scatter plot. It renders points from the auto-mpg dataset, with each point colored by origin and positioned by horsepower. The visualization is built with the Vega-Lite API, which constructs a Vega-Lite specification that is then rendered by Vega. Data is loaded asynchronously via the d3.csv function, and tooltips display car names on hover. The code customizes the chart’s appearance through a config object, setting fonts and axis styles, and uses a dark color for text.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes