Skip to main content
100%

Melting Data for Multiple Lines

✓ Published0🌍 Public
Rrigt
Last edited Oct 17, 2018
Created on Oct 17, 2018

This example visualizes population over time by region, displaying multiple trend lines across a Cartesian coordinate system. The chart uses D3’s `nest` and `line` with `curveBasis` to structure and smooth the data, while `scaleTime`, `scaleLinear`, and `scaleOrdinal` manage the axes and color encoding. A color legend, generated by a custom `colorLegend` function, identifies each region. The data comes from UN population estimates and medium-variant projections, processed through a custom `melt` function that reshapes the dataset.

AI-generated description
MIT Licensed

Similar vizzes