🌍 Public
Viewing a saved revision (read-only)
087d834aab9249a599282f8b2293fac0
Activity_6 Question 2
This stacked bar chart compares urban and rural population proportions across ten countries, with each horizontal bar segmented into two colored parts representing the population split. The visualization uses D3.js v7 with an SVG renderer, loading data from a CSV file and displaying percentages using a linear x-axis with percentage formatting. Hovering over a segment triggers a tooltip that reveals the precise percentage for that urban or rural population category. The chart includes a legend and axis labels, with colors assigned via a scaleOrdinal function using a two-color palette.
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.