🌍 Public
Viewing a saved revision (read-only)
b3e9d66cf9d0490e880fd64297e24fed
Working with time
This example visualizes San Francisco temperature readings over one week, plotting temperature against time as a smooth curve with individual data points marked by circles. It uses React to render SVG elements, with d3.scaleTime and d3.scaleLinear mapping the temporal and temperature domains. The d3.line generator with curveNatural creates the interpolated path, while custom AxisBottom and AxisLeft components draw the ticks. Data is loaded as CSV via d3.csv and parsed into JavaScript Date objects, with tooltips formatted using timeFormat.
AI-generated descriptionA scatter plot of The Iris Dataset.