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