Selecting a year on a line chart
✓ Published0🌍 Public
This line chart visualizes population estimates and projections for world regions from 1950 to 2100, using data from the UN Population Estimates and Medium Variant datasets. A vertical line marks the currently selected year, and moving the mouse across the chart updates this selection, with the year recomputed from the mouse position via the x-scale’s inverse mapping. The chart is built with D3 v5, using SVG rendering, scales, axes, and a basis-curve line generator, while a custom legend assigns colors to regions through a categorical ordinal scale.
AI-generated descriptionMIT Licensed