Fork of Melting Data for Multiple Lines
✓ Published0🌍 Public
This example shows population trends over time for multiple world regions from 1950 to 2100, using data from United Nations estimates and medium variant projections. Multiple line paths are drawn with d3.line using curveBasis, colored by a d3.scaleOrdinal with schemeCategory10, and accompanied by a custom color legend. The code melts the dataset into tidy rows, nests it by region with d3.nest, and renders axes with d3.axisBottom and d3.axisLeft on an SVG canvas.
AI-generated descriptionMIT Licensed