Skip to main content
100%

Selecting a Year on a Line Chart

✓ Published0🌍 Public
Ssongr0
Last edited Jul 16, 2019
Created on Jul 15, 2019

This line chart displays population trends over time for world regions, with a visual selection mechanism for a specific year (2019). The visualization uses D3 v5 to render an SVG, loading data from UN population estimates CSV files. The code employs `d3.nest()` to group data by region, `d3.scaleTime` and `d3.scaleLinear` for axes, and a custom color legend built with `d3-selection`. A `parseYear` function converts year values, while the chart updates interactively when a new year is selected.

AI-generated description
MIT Licensed

Similar vizzes