Skip to main content
100%

Vega-Lite API Template

✓ Published0🌍 Public
MMadNietzsche
Last edited Jul 23, 2021
Created on Jul 20, 2021

This example shows a stacked bar chart of population by country, with bars colored by religion. The visualization is built using the Vega-Lite API, a JavaScript wrapper for Vega-Lite, and renders to SVG via Vega. Data is loaded from a CSV file using D3’s `csv` function, and the chart encodes country on the x-axis, population on the y-axis, and religion as color. Tooltips are enabled through Vega Tooltip, and the chart auto-fits to the window size.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes