Fork of Selecting a Year on a Line Chart
✓ Published0🌍 Public
A fork of the "Selecting a Year on a Line Chart" example visualizes regional population changes over time from UN estimates and medium-variant projections. It displays multiple smoothed line paths, colored by region via `d3.scaleOrdinal` and `d3.schemeCategory10`, with a vertical black line marking a selected year. Users can drag the mouse over the chart to update the year, triggering a re-render that snaps the line to that date using `d3.mouse` and `d3.scaleTime.invert`. The SVG rendering uses d3.v5 and modular functions like `lineChart` and `colorLegend` for axes and legends.
AI-generated descriptionMIT Licensed