Fork of Vega-Lite API Template to tinker with
This example shows a bar chart of population by country, with bars colored by religion and a tooltip displaying population values on hover. It loads data from a CSV file hosted in a GitHub gist, then renders the visualization using the Vega-Lite API (vl) with a concise specification: markBar encoding country on the x-axis (sorted descending by population), population on the y-axis, and religion as color. The code imports vega, vega-lite, vega-lite-api, d3.csv for data loading, and vega-tooltip for interactive tooltips, with custom axis and label styling configured in a separate config.js file. The visualization dynamically sizes to the full window and uses an SVG renderer.