🌍 Public
Viewing a saved revision (read-only)
d6a5bde0498a4a808733ee3fb6898c75
Line Chart Group 2
This example shows a line chart of crop production over time, with year on the x-axis and production values on the y-axis, titled “Production vs Year.” The data is loaded from a CSV file via `d3.csv` and parsed using `new Date()` for years and numeric conversion for production. The visualization uses D3 v5 with `scaleTime`, `scaleLinear`, `axisBottom`, `axisLeft`, and `line` to render axes and the red path in an SVG. Grid lines are created via tick size extending across the chart, and axis labels are added as SVG text elements.
AI-generated descriptionA demonstration of how to start using D3 version 6.