Skip to main content
100%

Selecting a year on a line chart

✓ Published0🌍 Public
MMatthiasVanCampen
Last edited Mar 3, 2020
Created on Feb 14, 2020

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

Similar vizzes