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