Vega-Lite API Template
✓ Published0🌍 Public
This example shows a scatter plot of Milan metro suicide data, mapping years on the x-axis and metro lines on the y-axis with points colored by category. It uses the Vega-Lite API (vl) to declaratively define the visualization, with D3’s `csv` loading data from a Gist URL. The code registers Vega, Vega-Lite, and the vega-tooltip handler, then renders the chart as an SVG, sizing it to fit the window with custom axis and label styling from a shared config.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The data shown here comes from the UCI Machine Learning Repository: Auto MPG Data Set, via Gist: Scatter Plot with Menus.
MIT Licensed