Area Chart Question 2
✓ Published0🌍 Public
This example presents an area chart visualizing average temperatures for US cities, sourced from a CSV file. Built with D3 v7 and rendered as SVG, the chart includes rotated x-axis city labels and a y-axis labeled "Temperature (°C)". The code uses `d3.csvParse` to ingest the data, `d3.scaleBand` and `d3.scaleLinear` for axis scaling, and `d3.area` to generate the filled area path. Axis labels are added via SVG text elements. The chart is styled with Arial font and centered layout.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed