Skip to main content
100%

Fork of Selecting a Year on a Line Chart

✓ Published0🌍 Public
GGerasimos Katsagannis
Last edited May 23, 2022
Created on May 23, 2022

This visualization shows population trends over time for world regions using a multi-line chart, with a vertical line indicating the currently selected year. Users can hover over the chart to change the selected year, which updates the vertical marker. The chart is built with D3 v5, using `scaleLinear`, `scaleTime`, `d3.line` with `curveBasis` for smoothing, and `d3.nest` to group data by region. A color legend is rendered via a custom `colorLegend` function using `scaleOrdinal`. Population data is loaded from CSV census files and processed through a custom `melt` function.

AI-generated description
MIT Licensed

Similar vizzes