Skip to main content
100%

CPSC 436V Week 6 - Multiline Chart

✓ Published1🌍 Public
JJordan Chiu
Last edited Feb 13, 2020
Created on Feb 13, 2020

This example visualizes one week of temperature readings from cities around the world, plotting each city as a distinct colored line over time. The chart uses d3.scaleTime, d3.scaleLinear, and d3.line with curveBasis to create smooth paths, while d3.nest groups data by city. A color legend, built with a custom colorLegend function, orders entries by each line’s final temperature value. The rendered SVG includes styled axes with gridlines, a title, and axis labels, drawing from a CSV dataset loaded via d3.csv.

AI-generated description

Tutorial from YouTube

MIT Licensed

Similar vizzes