Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Line Chart with Multiple Lines

Public visualization

D3 Line Chart with Multiple Lines

0 stars0🌍 Public
JJunilo Pagobo
Last edited Dec 23, 2019
Created on Dec 23, 2019

This example displays temperature readings from multiple cities over time as smoothed, multi-hued lines, with a color legend identifying each city. It uses the D3 v5 library, building the chart with SVG and relying on `scaleTime`, `scaleLinear`, and `scaleOrdinal` to map data. Data is loaded from a CSV file, and lines are generated using `line` with `curveBasis`, while axes use `axisBottom` and `axisLeft`. The visualization also employs a custom `colorLegend` function to render the categorical color key.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed