Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Q1

Public visualization

Viewing a saved revision (read-only)

26fddc51bc5f4420a1390ed88246c996

Activity6_Q1

0 stars0🌍 Public
GGunna,Praneeth Reddy
Last edited Oct 30, 2025
Created on Oct 30, 2025
Forked from Activity6_Task2

This example visualizes the top 10 most populous countries from 2016 to 2020 using a stacked horizontal bar chart, where each bar is segmented by year to show the population distribution across the five-year period. The chart is built with D3.js v7, using `d3.stack()` to create the stacked data, `d3.scaleBand` for the y-axis, and `d3.scaleLinear` for the x-axis. Hovering over a segment displays a tooltip with the specific year, population, and percentage share. The data is sourced from a CSV file containing population figures for each country and year.

AI-generated description