Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Melting Data for Multiple Lines

Public visualization

Viewing a saved revision (read-only)

94c0bda10e424b7db8d55ecba5a3b65d

Melting Data for Multiple Lines

0 stars1🌍 Public
MMuhammad Jarir Kanji
Last edited Mar 8, 2021
Created on Dec 20, 2020

This visualization displays the history and future of world population as multiple lines, one per country or region, sorted by their final population value. The chart uses a time-based x-axis and a linear y-axis with formatted tick labels, while a color-coded legend identifies each line. Built with D3 v6, the example uses `d3.nest()` to group melted data from two UN population CSV datasets, `d3.line()` with `curveBasis` to generate smoothed paths, and a custom `colorLegend` component to render the ordinal color scale legend.

AI-generated description