Skip to main content
100%

Selecting a Year on a Line Chart

✓ Published0🌍 Public
PPotikorn
Last edited Feb 28, 2020
Created on Feb 27, 2020

This line chart displays population estimates and projections for global regions from 1950 to 2100, using data from the UN Population Estimates. A vertical black line marks the currently selected year, which updates when the user moves the mouse across the chart. The visualization uses d3.scaleTime, d3.scaleLinear, d3.nest, and d3.line with curveBasis to render the paths. A color legend built with custom SVG elements identifies each region. The mouse interceptor rect calls setSelectedYear on mousemove to change the highlighted year.

AI-generated description

This line chart shows one week of temperature (in degrees Celcius) in cities around the world. The data comes from Data Canvas - Sense Your City.

MIT Licensed

Similar vizzes