Fork of Vega-Lite API Template
✓ Published0🌍 Public
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 descriptionA visualization constructed using the vega-lite-api.
MIT Licensed