Fork of Selecting a Year on a Line Chart
✓ Published0🌍 Public
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 descriptionMIT Licensed