Skip to main content
100%

Melting Data for Multiple Lines

✓ Published0🌍 Public
Nnadia-el
Last edited Mar 24, 2020
Created on Mar 24, 2020

This example visualizes COVID-19 death tolls across multiple countries, plotting each country as a separate line that traces cumulative deaths over days since the first reported case. The chart uses D3 v5 with SVG rendering, employing `nest()` to group the data by country and `line()` with `curveBasis` to draw smooth paths. A draggable vertical line, implemented with D3's `drag()` function, lets users explore data at specific time points, showing the death counts for all countries at that moment. Color legends and axes are generated with `scaleOrdinal` and `axisLeft`/`axisBottom`.

AI-generated description
MIT Licensed

Similar vizzes