Skip to main content
100%

Selecting a Year on a Line Chart

✓ Published1🌍 Public
NNikola Rožić
Last edited Nov 26, 2020
Created on Nov 26, 2020

This visualization displays population trends over time for various world regions using a line chart, rendered with SVG. Users can hover over the chart to select a specific year, which updates a vertical black line to mark that point in time. Built with D3 v5, the code utilizes `scaleTime`, `scaleLinear`, `axisBottom`, and `axisLeft` for axes, `line` with `curveBasis` for the paths, and `nest` to group data by region. The color legend is created using `scaleOrdinal` with `schemeCategory10`. Data comes from UN population estimates.

AI-generated description
MIT Licensed

Similar vizzes