🌍 Public
Viewing a saved revision (read-only)
318493231a7d4898a31ea49911f6cf4b
d3 curve
This example shows a green curve rendered through an SVG path, connecting four user-defined points using D3’s line generator with the natural cubic spline interpolation. The curve’s shape is computed from the point coordinates, which are explicitly set inside the JavaScript code. D3.v5 is used to build the path data, while the path is appended to an `<svg>` element with the ID `svg1`. The page also includes a separate canvas element, though it is not involved in this rendering. The code references `getPointAtLength` to inspect the path geometry.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.