Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 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.

MIT Licensed

Similar vizzes