Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

How to create a line chart using D3

Public visualization

How to create a line chart using D3

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed