Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Vega-Lite API Template

Public visualization

Viewing a saved revision (read-only)

9ee068c9de04454695e7f0db55e93ba1

Fork of Vega-Lite API Template

0 stars0🌍 Public
MMatty Danbury
Last edited Sep 8, 2022
Created on Sep 8, 2022

This example visualizes automobile performance and origin using a scatter plot generated with the Vega-Lite API, where each circle’s position encodes miles per gallon and horsepower, while color indicates the car’s origin and size encodes weight. Tooltips display the car name on hover. The code loads a CSV dataset via `d3.csv`, constructs the chart with `vl.markCircle` and its encoding helpers, then renders it to canvas using Vega’s `view` with a custom config for axis styling and label fonts. The visualization fills the window and updates responsively.

AI-generated description

A visualization constructed using the vega-lite-api.