Skip to main content
100%

Selecting a Year on a Line Chart

✓ Published0🌍 Public
RRajesh572
Last edited Feb 4, 2020
Created on Feb 4, 2020

This line chart visualizes population over time for different world regions, from 1950 to 2100, using a dashed vertical line to mark a user-selected year. Hovering over the chart updates the selection, which re-renders the visualization. The code employs D3 v5's `scaleTime`, `scaleLinear`, `scaleOrdinal`, `line`, and `nest` APIs, with SVG rendering. Data is loaded from UN population estimate and medium-variant CSV files, processed via a custom melt function that filters region names.

AI-generated description
MIT Licensed

Similar vizzes