Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Multiple lines

Public visualization

Multiple lines

0 stars0🌍 Public
RRoger Yu-Hsiang Lo
Last edited Feb 14, 2020
Created on Feb 14, 2020

This example visualizes a week of temperature readings from multiple cities using multiple colored lines, with a legend identifying each city. The chart uses D3 v5 with SVG rendering, employing `scaleTime` and `scaleLinear` for axes, `nest()` to group data by city, and `line()` with `curveBasis` for smooth paths. A categorical color scale assigns distinct strokes, and a custom `colorLegend` function renders the legend. Data is loaded from a CSV file via `d3.csv`, with axes from `axisBottom` and `axisLeft`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed