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)

d81249eceadb44a585140ece13b77bf1

Selecting a Year on a Line Chart

0 stars0🌍 Public
AAnShed
Last edited Jul 8, 2020
Created on Jul 8, 2020

This interactive line chart visualizes population trends over time by region, with a focus on a selected year. The visualization displays multiple region lines and a movable vertical line; as the user moves the mouse across the chart, the selected year is updated and crosshairs track the cursor. Data is sourced from UN population estimates, and the chart is built with D3 v5, specifically using `scaleTime`, `scaleLinear`, `axisBottom`, `axisLeft`, and `curveBasis`. The rendering uses SVG and includes a color legend. Interaction is handled via an overlay rectangle’s `mousemove` event, which inverts the D3 scales to update the selection.

AI-generated description