Vega-Lite API Stacked Bar Chart Template
✓ Published0🌍 Public
This example demonstrates a stacked bar chart generated using the Vega-Lite API, with data loaded from a CSV of religious demographics by country. The code imports the vega, vega-lite, and vega-lite-api libraries, registers them together, and configures a custom tooltip handler. The visualization renders as an SVG that fills the entire viewport, using the `autosize` fit option and custom axis and label styling defined in a separate configuration module. The data is fetched asynchronously via D3's `csv` function.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed