🌍 Public
A7_ Small multiples (of lines) chart
This example displays monthly temperature variations for four U.S. cities—NYC, LA, Chicago, and Houston—as small multiples of line charts, with dots marking each data point and a color-coded legend. Hovering over a dot enlarges it and shows the exact temperature value as a tooltip. The code uses D3 v7’s `d3.csv`, `d3.scaleBand`, `d3.scaleLinear`, `d3.line`, and `d3.axisBottom`/`d3.axisLeft` to render SVG charts, with data pulled from a GitHub-hosted CSV file. A `d3.legendColor` scale generates the legend, and the visualization is built with React in a single HTML file.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed
Comments
Sign in to join the discussion.