Fork of Melting Data for Multiple Lines
✓ Published0🌍 Public
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 descriptionMIT Licensed