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)

15111f5703ee40909bdeb7708111c403

Fork of Vega-Lite API Template

0 stars0🌍 Public
HHongleang Lim
Last edited Feb 14, 2022
Created on Feb 14, 2022

This example visualizes the relationship between engine displacement and horsepower for vehicles from the auto-mpg dataset, with tooltips showing car names on hover. It is built using the Vega-Lite API, which generates a scatter plot encoded with quantitative fields for both axes, rendered as semi-transparent points. The code registers Vega, Vega-Lite, and Vega-Lite API libraries, applies a custom dark-themed configuration in config.js, and loads CSV data asynchronously via d3.csv. The chart fills the entire browser window by dynamically setting width and height to the viewport dimensions.

AI-generated description

A visualization constructed using the vega-lite-api.