Skip to main content
100%

Melting Data for Multiple Lines

✓ Published1🌍 Public
Wwblockchain
Last edited Jan 22, 2020
Created on Jan 22, 2020

This example shows population over time by region, with multiple lines rendered as overlapping paths in a SVG chart. The visualization uses d3.line with curveBasis to smooth the lines, and d3.nest to group data by region, sorting lines by their final value. The data comes from UN population estimates, processed through a custom melt function that transforms wide CSV data into a long format. A color legend is built using d3.scaleOrdinal and schemeCategory10, with axes created via d3.axisLeft and d3.axisBottom.

AI-generated description
MIT Licensed

Similar vizzes