Line Chart – Working With Time
This line chart visualizes temperature readings over time from the Data Canvas Sense Your City Dataset, showing a week of hourly measurements for San Francisco. The visualization uses React components to render SVG elements, with D3 v7’s `scaleTime`, `scaleLinear`, and `extent` functions handling the data mapping. The `line` generator with `curveNatural` smooths the temperature trend, while `timeFormat` formats the axis ticks as abbreviated weekday names. Circles mark individual data points, each with a native SVG `<title>` element providing tooltip functionality. The chart includes labeled axes positioned via React transforms, with data fetched using `csv` from the D3 library.
AI-generated descriptionA scatter plot of Data Canvas Sense Your City Dataset using[d3-time-format] (https://github.com/d3/d3-time-format)