Skip to main content
100%

Selecting a Year on a Line Chart

✓ Published0🌍 Public
ZZ-Richard
Last edited Jun 23, 2020
Created on Jun 22, 2020

This example shows population trends for world regions from 1950 to 2100 as multiple colored line paths. A black vertical line marks the currently selected year, which updates as the user moves the mouse across the chart. The visualization uses d3.nest, d3.scaleTime, d3.scaleLinear, and d3.line with curveBasis to render the SVG paths, while a custom color legend sorts regions by their final population. Data comes from two UN population estimate CSV files merged in loadAndProcessData.

AI-generated description
MIT Licensed

Similar vizzes