Skip to main content
100%

Line Chart with Multiple Lines Matching The legend

✓ Published1🌍 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
MIT Licensed

Similar vizzes