Selecting a Year on a Line Chart
✓ Published1🌍 Public
This visualization shows population trends over time for major world regions, with a vertical green line marking a selected year that users can change by moving the mouse across the chart. The line chart uses d3.line with a curveBasis for smoothing, while d3.nest groups the data by region. A d3.mouse handler on a transparent rectangle calls xScale.invert to convert mouse position into a year, updating the selection. Data comes from UN population estimates loaded via d3.csv.
AI-generated descriptionMIT Licensed