Skip to main content
100%

Vega-Lite API Template

✓ Published17🌍 Public
CCurran Kelleher
Last edited Apr 26, 2020
Created on Nov 15, 2019

This example shows the relationship between engine displacement and horsepower for a collection of automobiles, with points colored by region of origin and tooltips revealing model names. The visualization uses the Vega-Lite API to construct a scatter plot declaratively, with `vl.markCircle`, `vl.x`, `vl.y`, and `vl.color` encoding channels. Data loads asynchronously via D3’s `csv` function from a GitHub gist, and the resulting chart renders as SVG, styled through a custom config object that adjusts axis and label appearance. The code integrates Vega, Vega-Lite, Vega-Lite API, and Vega-Tooltip to enable interactive hover details.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes