Skip to main content
100%

Vega-Lite API

✓ Published0🌍 Public
KKelly Egan
Last edited Mar 22, 2021
Created on Mar 22, 2021

This example demonstrates a scatter plot of automobile data, showing the relationship between miles per gallon and horsepower, with tooltips displaying vehicle names. The visualization is built using the vega-lite-api library, which provides a fluent JavaScript interface for the Vega-Lite grammar. The code registers Vega and Vega-Lite, loads the auto-mpg dataset from a CSV file via d3.csv, and renders the plot as a scalable vector graphic. The visualization fills the entire browser window and employs a dark-themed configuration to enhance readability, with a low opacity mark size for improved depth perception.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes