Skip to main content
100%

Fork of Melting Data for Multiple Lines

✓ Published0🌍 Public
Ccpmorrill@gmail.com
Last edited Feb 2, 2024
Created on Feb 2, 2024

This example visualizes population over time by region from a UN dataset, showing multiple lines from 1950 to 2100 using nested data. The visualization uses D3 v5’s `scaleTime`, `scaleLinear`, and `scaleOrdinal` for axes and color, with `axisBottom` and `axisLeft` for tick marks. Lines are generated via `line` with `curveBasis`, and a custom `colorLegend` function displays the categorical color scale. The code employs `nest` and `descending` to sort regions by their final population value, rendering the SVG with a multiply blend mode.

AI-generated description
MIT Licensed

Similar vizzes