Skip to main content
100%

Vega-Lite API Template

✓ Published0🌍 Public
AAnthony Ynami
Last edited Feb 18, 2021
Created on Feb 18, 2021

This example shows a bar chart of religious demographics by country, with each bar colored by religion and tooltips revealing population counts. The visualization is built using the Vega-Lite API, which wraps the higher-level vl.encode patterns for declarative chart specification. The code uses `vl.markBar()` with `vl.x()`, `vl.y()`, `vl.color()`, and `vl.tooltip()` to define the visual channels, while data is loaded via `d3.csv` from a remote URL. The chart renders as SVG, with custom axis and label styling configured through the `config` object and displayed in a full-window view.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes