Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Melting data for multiple lines

Public visualization

Melting data for multiple lines

0 stars0🌍 Public
JJuyeonee
Last edited Jul 21, 2021
Created on Jul 21, 2021

This example displays population trends over time for multiple world regions as overlapping curved lines, with a color legend identifying each region and a vertical marker highlighting the year 2018. The visualization uses D3 v5’s `nest()` to group data by region, `scaleTime` and `scaleLinear` for axes, and `line` with `curveBasis` to generate smooth paths. Data is loaded from CSV files via `csv()` and melted from wide to long format, while `axisBottom` and `axisLeft` render the grid and labels.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed