Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Selecting a year on a line chart

Public visualization

Selecting a year on a line chart

0 stars0🌍 Public
MMauradion
Last edited May 27, 2021
Created on May 27, 2021

This visualization shows world population trends over time across regions, with a vertical line marking a selected year. Users can move their mouse across the chart to update the selected year, which highlights the corresponding point in time. The code uses d3.line, d3.scaleTime, d3.scaleLinear, and d3.axisBottom to render the SVG line chart, while d3.mouse captures interactive hover events. Population data comes from UN estimates (1950-2014) and medium variant projections (2015-2100), processed via d3.csv and d3.nest.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed