Skip to main content
100%

How to create a line chart using D3

✓ Published0🌍 Public
Hhanulik.ondrej@gmail.com
Last edited Nov 11, 2022
Created on Jul 28, 2022
Forked from Basic shapes

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
MIT Licensed

Similar vizzes