Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Selecting a Year on a Line Chart

Public visualization

Viewing a saved revision (read-only)

7befb084f64641cc86febcfae006c442

Selecting a Year on a Line Chart

0 stars0🌍 Public
LLongYuu
Last edited Nov 29, 2020
Created on Nov 29, 2020

Multiple colored lines trace regional population changes from 1950 to 2100, using data from the UN Population Estimates and Medium Variant datasets. A vertical black line marks the currently selected year, which updates when the user hovers over the chart via a mouse-interceptor rectangle that calls `setSelectedYear` with `xScale.invert`. The chart uses d3.scaleTime, d3.scaleLinear, d3.line with curveBasis, and d3.axisLeft/axisBottom; a separate color legend built with `colorLegend.js` identifies each region.

AI-generated description