Skip to main content
100%

Selecting a Year on a Line Chart

✓ Published0🌍 Public
DDeepHarvey
Last edited Mar 5, 2020
Created on Mar 5, 2020

A line chart displays population estimates and projections for world regions from 1950 to 2100, sourced from UN population data. Moving the mouse across the chart updates a vertical black line marking the selected year, with each region’s line colored via a categorical scale. The visualization uses D3 v5’s `scaleTime`, `scaleLinear`, `line` with `curveBasis`, and `nest` to group data, while mouse interaction relies on `mouse` and `xScale.invert`. A custom `colorLegend` component renders the color key.

AI-generated description
MIT Licensed

Similar vizzes