Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Melting Data for Multiple Lines

Public visualization

Viewing a saved revision (read-only)

28374f7e89704f34b992e4f01214356f

Melting Data for Multiple Lines

0 stars0๐ŸŒ 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