Skip to main content
100%

Line Chart with Multiple Lines

✓ Published1🌍 Public
Wwishcsdev
Last edited Apr 9, 2019
Created on Apr 9, 2019

This example displays suicide numbers across countries over time, with each country’s yearly data shown as a separate colored line and a matching color legend on the right. Using d3.csv to load the dataset, d3.scaleTime and d3.scaleLinear map years and suicide counts, while d3.nest groups records by country and sorts them by the last value. The SVG rendering includes axes, gridlines, and a title, though the line paths are commented out, so only colored circles appear at data points.

AI-generated description
MIT Licensed

Similar vizzes