Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Vega-Lite API Template

Public visualization

Viewing a saved revision (read-only)

33c396710bc344ab916fc045fba2b9c7

Vega-Lite API Template

0 stars0🌍 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.