Fork of Temperature in San Francisco Line Chart
✓ Published2🌍 Public
This line chart visualizes temperature over time in San Francisco, with time on the x-axis and temperature on the y-axis. The code uses d3.csv to load the data, d3.scaleTime and d3.scaleLinear for scaling, and d3.axisBottom and d3.axisLeft for axes. A d3.line generator with a curveBasis curve renders the temperature trend as a maroon path, while the React-based VizContainer component (though not used in this index.js) abstracts the SVG margin convention. The chart includes axis labels for "Time" and "Temperature" and dashed grid lines via tickSize.
AI-generated descriptionBoilerplate code for a React + D3 visualization with:
- CDN links for React, ReactDOM, and D3
- Basic React boilerplate
- Variables for dimensions and margins
- A
VizContainercomponent that:- Abstracts SVG/group container elements
- Follows the margin convention
- Show the margins, which can be easily removed by deleting the
showMargins={true} prop
MIT Licensed