Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Vega-Lite API Template

Public visualization

Fork of Vega-Lite API Template

0 stars0🌍 Public
SSun Hwy (David) Kim
Last edited Mar 25, 2022
Created on Mar 24, 2022

This example presents a bar chart illustrating population by country, with each bar colored by religion. The chart is built using the Vega-Lite API, which constructs a visualization specification that is compiled to Vega and rendered as SVG. The code loads CSV data from a Gist URL and supports interactive tooltips through the vega-tooltip handler. The `vl.markBar` method encodes the x-axis with the country field sorted by descending population, the y-axis with the population field, and colors bars by religion.

AI-generated description

A visualization constructed using the vega-lite-api.

Comments

Sign in to join the discussion.

MIT Licensed