Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Vega-Lite API Template

Public visualization

Viewing a saved revision (read-only)

d01dfb0eccdd46e7908c5c297e6517c6

Fork of Vega-Lite API Template

0 stars0🌍 Public
Ccheruvatheryvishnu@gmail.com
Last edited Jan 4, 2024
Created on Jan 4, 2024

This example demonstrates a bar chart of population by country, colored by religion, using the Vega-Lite API. The visualization sorts countries by descending population and includes tooltips for each bar’s population value. It loads CSV data from a GitHub gist via `d3.csv` and renders the chart as an SVG using Vega-Lite’s `markBar` encoding, with custom axis and label styling from a shared config. The code registers Vega-Lite and Vega-Tooltip handlers to enable interactive tooltips.

AI-generated description

A visualization constructed using the vega-lite-api.