🌍 Public
Viewing a saved revision (read-only)
0dfd5bc214c74944a929d6f29d9e3000
Fork of Hello VizHub Task 2
This stacked bar chart shows the distribution of population across years for the top 10 countries, with each bar segment representing a year's contribution. The visualization uses D3.js v7, employing `d3.stack` with `d3.keys` to create the stacked structure, `d3.scaleLinear` and `d3.scaleBand` for axes, and `d3.axisBottom` and `d3.axisLeft` for ticks. Data is loaded from a CSV file, with `d3.csv` fetching the dataset. The chart renders as SVG, populating rectangles for each segment, and includes a legend and axis labels.
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.