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)

117a7bfeda6c43bcb43efc6bab938a74

Fork of Vega-Lite API Template

0 stars0🌍 Public
GGyromighty
Last edited Nov 17, 2021
Created on Nov 17, 2021

This example visualizes the relationship between engine displacement and horsepower for automobile models using the Vega-Lite API, with tooltips displaying car names on hover. It renders a scatter plot with semi-transparent points on a full-screen canvas, configured for a clean dark-on-light aesthetic. The code loads data from a CSV file via D3’s `csv` function, then builds the visualization declaratively with `vl.markPoint` and `vl.x().fieldQ()`, wiring everything together through Vega-Lite and Vega’s runtime, including custom tooltip handling via the `Handler` from `vega-tooltip`.

AI-generated description

A visualization constructed using the vega-lite-api.