Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Template Vega-Lite Api

Public visualization

Viewing a saved revision (read-only)

89225c9672e342c880ab35c32b813907

Template Vega-Lite Api

0 stars0🌍 Public
AAlan Santos
Last edited Jun 1, 2022
Created on Jun 1, 2022

This example demonstrates a scatter plot of automobile data, mapping miles per gallon, horsepower, weight, and origin using the Vega-Lite API. It shows how to declaratively build interactive visualizations with circle marks, color encoding, and tooltips. The code registers Vega, Vega-Lite, and vega-tooltip via `vl.register`, loads CSV data from a gist using d3.csv, and renders to an SVG view that fits the window. Appearance is customized with a configuration object, and the visualization auto-sizes with padding.

AI-generated description

A visualization constructed using the vega-lite-api.