Skip to main content
100%

Melting Data for Multiple Lines

✓ Published1🌍 Public
Ssafdarawan
Last edited Jun 1, 2020
Created on Jun 1, 2020

This example visualizes the number of confirmed COVID-19 cases over time for several countries, using animated multiple lines that appear to "melt" as they extend. The chart initially loads all data, then after a brief delay, it progressively renders lines day by day up to day 92, with each line colored and labeled for its country. The code uses D3 v5 APIs such as `nest()`, `line()`, `scaleLinear()`, and `transition()` to update the paths, while the `yValue` function adds random noise to China’s data after day 52, creating a melting effect. Data is loaded from CSV files and rendered as SVG.

AI-generated description
MIT Licensed

Similar vizzes