🌍 Public
Viewing a saved revision (read-only)
37d2bcf022f1434ea67409e2ff9d199f
Vega-Lite API Template I
This example shows a bar chart of population by country, with bars colored by religion and tooltips displaying population values on hover. Using the Vega-Lite API, it constructs a specification via `vl.markBar`, `vl.x`, `vl.y`, and `vl.color` encodings, then renders it through `vl.register` with Vega 5 and Vega-Lite 4. The data is loaded asynchronously via `d3.csv` from a GitHub-hosted CSV. Appearance is customized through a shared configuration object that adjusts axis and label styling.
AI-generated descriptionA visualization constructed using the vega-lite-api.