Skip to main content
100%

Stacked Bars

✓ Published1🌍 Public
YYee Han
Last edited Dec 22, 2020
Created on Dec 22, 2020

This example displays a stacked bar chart of population by country and religion, with countries sorted by total population and each bar segmented by religious affiliation. The visualization is constructed using the Vega-Lite API, with the `vl.markBar()` method encoding the x-axis as country, y-axis as quantitative population values, and color as religion category. Data is loaded asynchronously from a CSV file via `d3.csv`, and the chart is rendered with SVG using Vega-Lite’s declarative specification, enhanced by a custom config for axis styling and tooltip support through Vega Tooltip.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes