🌍 Public
Viewing a saved revision (read-only)
e8f9d2ab7d734e67975dfe04e1676644
QUESTION-2(TASK-2)
This stacked horizontal bar chart displays population distribution across multiple countries for the years 1950–2020, with each bar segment representing a yearly population count. It uses d3.csv to load the data, d3.stack() to compute the stacked segments, and d3.scaleOrdinal with d3.schemeCategory10 for color encoding. Hovering over a segment highlights it and shows a tooltip with the specific year and population value, using d3.axisLeft, d3.axisBottom, and d3.scaleBand.
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.