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
NNeepaB
Last edited Jan 7, 2021
Created on Jan 7, 2021

This interactive line chart displays population changes over time for multiple world regions, using a vertical black line to mark a user-selected year. Moving the mouse across the chart updates the selected year, which is reflected in the line’s position. The visualization is built with D3 v5, using `d3.line` for the paths, `d3.axisBottom` and `d3.axisLeft` for axes, and a `mousemove` event listener on a transparent overlay rect to trigger year changes. Data comes from UN population estimates and medium variant projections, rendered as SVG.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed