Skip to main content
100%

Selecting a Year on a Line Chart

✓ Published1🌍 Public
Rrigt
Last edited Jan 10, 2019
Created on Jan 10, 2019

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 description
MIT Licensed

Similar vizzes