Multiple lines
✓ Published0🌍 Public
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 descriptionMIT Licensed