Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Selecting a Year on a Line Chart

Public visualization

Selecting a Year on a Line Chart

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed