Stacked Bars
✓ Published1🌍 Public
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 descriptionA visualization constructed using the vega-lite-api.
MIT Licensed