viz_plots
✓ Published0🌍 Public
This example displays a bar chart of the top 20 countries by population, with each bar colored according to the predominant religion of that country. The visualization is generated using the Vega-Lite API via `vega-lite-api`, which interfaces with the Vega and Vega-Lite rendering engines to create an SVG output. Data is fetched asynchronously from a CSV file hosted on GitHub using D3.js's `csv` function. The chart encodes country on the x-axis, population on the y-axis, and religion as both color and tooltip, with axes configured through a custom config object.
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