Skip to main content
100%

Fork of Selecting a Year on a Line Chart

✓ Published0🌍 Public
Hhoanganh97bkhn
Last edited Feb 23, 2021
Created on Feb 22, 2021

A multi-line chart displays United Nations population estimates and projections by region from 1950 to 2100, with a vertical line marking the currently selected year. Mousing over the chart updates the line’s position, using the d3.mouse event and xScale.invert to set the selected year. The visualization renders in SVG with d3.line, curveBasis, and ordinal color scales, while a color legend lists each region. Data comes from two CSV files concatenated after melting wide-format rows into tidy year–population pairs.

AI-generated description
MIT Licensed

Similar vizzes