🌍 Public
Viewing a saved revision (read-only)
fca13a34f7764aaeb919ddb78a98b2f2
Vega-Lite API Template
This example demonstrates a scatter plot of automotive data, showing the relationship between engine displacement and horsepower for individual car models, with tooltips revealing the car’s name on hover. It uses the Vega-Lite API to declaratively define the chart’s marks, encodings, and scales, which are then rendered as SVG via Vega and Vega-Lite. Data is loaded asynchronously from a CSV file using D3’s `csv` function, while a custom configuration adjusts axis labels and colors for readability. The visualization dynamically resizes to fit the browser window.
AI-generated descriptionA visualization constructed using the vega-lite-api.