Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Selecting a Year on a Line Chart

Public visualization

Viewing a saved revision (read-only)

67415bd79c914ff2ae8327ed334035cd

Selecting a Year on a Line Chart

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