Skip to main content
100%

Selecting a Year on Line Chart

✓ Published1🌍 Public
KKazushige Okuma
Last edited Oct 8, 2019
Created on Oct 3, 2019

A line chart shows population change from 1950 to 2100 across world regions, with a vertical black line marking a user-selected year. Clicking or dragging on the chart updates the line position, and hovering triggers the same interaction. The visualization uses D3 v5 APIs including `scaleTime`, `scaleLinear`, `axisBottom`, `axisLeft`, `line`, `curveBasis`, and `nest`, plus a custom `colorLegend`. Data comes from UN population estimates and medium variant projections, loaded via D3's `csv` function and processed with `melt` to reshape the data into tidy format.

AI-generated description
MIT Licensed

Similar vizzes