Skip to main content
100%

Vega-Lite API Stacked Bar Chart Template

✓ Published0🌍 Public
JJohn Kobbeman
Last edited Feb 28, 2021
Created on Feb 28, 2021

This stacked bar chart reveals the distribution of religious affiliations by country, with each bar sorted by total population and segmented by religion. The visualization is generated using the Vega-Lite API, which constructs a declarative specification for the mark `markBar` and encodings for x, y, color, and tooltip. It relies on Vega-Lite’s `vl` API, registers with Vega and Vega-Lite libraries, and fetches CSV data from a Gist. The chart uses custom configuration for axis styling and renders with an SVG view.

AI-generated description

A 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

Similar vizzes