Skip to main content
100%

Line Chart with React & D3

✓ Published0🌍 Public
223100098@lums.edu.pk
Last edited Oct 15, 2025
Created on Oct 15, 2025

This line chart shows monthly atmospheric CO₂ measurements from 1958 onward, with time on the x‑axis and CO₂ concentration in ppm on the y‑axis. The React component loads CSV data using `d3.csv`, parses dates with `d3.timeParse`, and passes the data to a reusable `viz` function. That function builds scales with `d3.scaleTime` and `d3.scaleLinear`, renders axes via `d3.axisBottom` and `d3.axisLeft`, and draws the curved line with `d3.line` using `curveMonotoneX`. Points with missing values are skipped via the line generator’s `.defined` method.

AI-generated description
MIT Licensed

Similar vizzes