Skip to main content
100%

Fork of Selecting a Year on a Line Chart

✓ Published0🌍 Public
Aannadehtiarova
Last edited Feb 3, 2021
Created on Feb 3, 2021

This interactive line chart displays United Nations population projections from 1950 to 2100, with each line representing a world region. Users can hover over the chart to select a year, triggering a vertical marker that updates the display. The visualization uses d3.line with curveBasis, d3.nest for data grouping, and d3.scaleOrdinal with schemeCategory10 for color encoding. A custom d3.scaleTime handles the year axis, while event listeners on a transparent rectangle detect mouse movement to update the selected year and re-render the SVG.

AI-generated description
MIT Licensed

Similar vizzes