Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Line Chart with Multiple Lines Matching The legend

Public visualization

Viewing a saved revision (read-only)

5be43bd33b8a49cf9571be57aeeb1544

Line Chart with Multiple Lines Matching The legend

0 stars1🌍 Public
EEllednera
Last edited Nov 17, 2020
Created on Nov 17, 2020

This example shows a week of temperature readings from multiple cities as smooth, overlapping line paths, with a color legend matching each line to its city. The chart uses D3 v6 with `scaleTime`, `scaleLinear`, and `scaleOrdinal`, and nests the CSV data by city via `d3.nest`. Lines are generated with `d3.line` and `curveBasis`, while a custom `colorLegend` component renders the legend with SVG circles and text.

AI-generated description