Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Selecting a Year on a Line Chart

Public visualization

Viewing a saved revision (read-only)

e7714a78e3a341c68da92b45a040b950

Fork of Selecting a Year on a Line Chart

0 stars1🌍 Public
Rrajeshathakur
Last edited Apr 15, 2021
Created on Apr 15, 2021

This interactive line chart displays population trends over time by region, using data from UN population estimates. A vertical black line marks the currently selected year, and users can hover over the chart to update this selection, which the visualization updates in real time. The D3 code organizes regions by color using `d3.scaleOrdinal` and `d3.schemeCategory10`, draws the lines with `d3.line` and `d3.curveBasis`, and renders axes with `d3.axisLeft` and `d3.axisBottom`. A custom legend component maps colors to region names, and the data is loaded from CSV files.

AI-generated description