Selecting a Year on a Line Chart
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.