Vega Lite API Template
✓ Published2🌍 Public
This example shows a bar chart of population by country, colored by religion, using the Vega-Lite API within a React application. It renders stacked bars that sort countries by population and include tooltips for each data segment. The code loads CSV data from a GitHub gist via d3.csv, configures a dark theme with custom axis and label styles, and uses Vega-Lite’s declarative API to encode the chart. Vega and Vega-Lite are registered with a tooltip handler, and the final visualization is appended to the document body.
AI-generated descriptionA bare minimum HTML page.
MIT Licensed