Skip to main content
100%

Vega-Lite API Template

✓ Published391🌍 Public
CCurran Kelleher
Last edited Jan 4, 2024
Created on Sep 2, 2019

This example demonstrates a scatter plot of automotive engine displacement versus horsepower, where each point represents a vehicle and tooltips reveal its model name. Built with the Vega-Lite API, it registers Vega and Vega-Lite through the `vl.register()` function and loads data from a CSV file of auto-mpg statistics using `d3.csv`. The visualization uses `vl.markPoint()` with configurable opacity and axis styling, rendered as an SVG that scales to fit the browser window via `autosize({ type: 'fit' })`.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes