Selecting a Year on a Line Chart
✓ Published1🌍 Public
This interactive line chart displays population over time by global region, compiled from UN population estimates and medium-variant projections. A vertical line marks the currently selected year, which the viewer can change by moving the mouse over the chart. The visualization uses `d3.line` with basis curves for each region’s series, colored via an ordinal scale. The `mouse` utility captures pointer position to update the selected year, triggering a re-render that redraws the selection line and axis. The SVG is rendered using D3’s selection API, with axes, labels, and a legend generated programmatically.
AI-generated descriptionMIT Licensed