🌍 Public
Viewing a saved revision (read-only)
b489cad79f7e4d1094506b2f7b843863
How to create a line chart using D3
This example demonstrates how to build a line chart with D3 v6, rendering an SVG with a pink background. It plots two lines: one from a dataset of coordinate pairs using `d3.line()` with `curveMonotoneX`, and a second hardcoded line, alongside red circles for the data points. The chart includes axes created with `d3.axisBottom` and `d3.axisLeft`, a title, and axis labels, with styling applied via CSS classes for stroke and fill.
AI-generated description