Multi-Series Line Chart
✓ Published0🌍 Public
Mmbostock
Last edited Oct 20, 2018
Created on Oct 13, 2012
This multi-series line chart shows daily average temperatures for New York, San Francisco, and Austin over one year, using color-coded lines for each city. The data is loaded from a TSV file and parsed with `d3.tsv` and `d3.timeParse`. It uses `d3.scaleTime` for the x-axis, `d3.scaleLinear` for the y-axis, and `d3.scaleOrdinal` with `d3.schemeCategory10` for color encoding. Lines are drawn with `d3.line` and a basis curve, while `d3.axisBottom` and `d3.axisLeft` render the axes. City labels are appended at the end of each line.
AI-generated descriptionThis line chart is constructed from a TSV file storing the daily average temperatures of New York, San Francisco and Austin over the last year. The chart employs conventional margins and a number of D3 features:
- d3.tsv - load and parse data
- d3.time.format - parse dates
- d3.time.scale - x-position encoding
- d3.scale.linear - y-position encoding
- d3.scale.category10, a d3.scale.ordinal - color encoding
- d3.extent, d3.min and d3.max - compute domains
- d3.keys - compute column names
- d3.svg.axis - display axes
- d3.svg.line - display line shape
gpl-3.0 Licensed