Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Time Series: Part 2 - Line Chart

Public visualization

Viewing a saved revision (read-only)

b8fcdb3c23cb46d9a36c35235a4103c7

Fork of Time Series: Part 2 - Line Chart

0 stars0🌍 Public
Ppravalika.thogaru10@gmail.com
Last edited Mar 12, 2023
Created on Mar 12, 2023

A line chart visualizes temperature readings over time from the Data Canvas Sense Your City dataset, drawing a smooth, natural curve through the data points using D3's `line` and `curveNatural` generators. Time is mapped to the x-axis via `scaleTime` and temperature to the y-axis via `scaleLinear`, with custom `AxisBottom` and `AxisLeft` components rendering tick marks and labels. The React component loads the CSV asynchronously with `useEffect` and `csv`, applying a `timeFormat` for weekday labels. The SVG output is styled with CSS, including colored axes, grid lines, and a curved stroke for the temperature trend.

AI-generated description