Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Selecting a Year on a Line Chart

Public visualization

Viewing a saved revision (read-only)

5e34db4d14c842a68a4ef60b0ce5e772

Selecting a Year on a Line Chart

0 stars0🌍 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