Selecting a Year on a Line Chart
✓ Published0🌍 Public
This line chart visualizes UN population estimates and projections by region from 1950 to 2100, with a vertical line marking a selected year. A clickable mouse-interceptor rectangle lets users hover to update the selected year via `setSelectedYear`, which re-renders the chart. The visualization uses d3.scaleTime, d3.scaleLinear, d3.line with curveBasis, and d3.nest for grouping, rendering as SVG with an ordinal color scale legend. Data comes from two CSV files loaded with d3.csv, combining estimates and medium-variant projections.
AI-generated descriptionMIT Licensed