Skip to main content
100%

Selecting a Year on a line chart

✓ Published0🌍 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
MIT Licensed

Similar vizzes