🌍 Public
Viewing a saved revision (read-only)
54cde6f60f7944c2a8b58411bdd939d7
D3 and SVG smile
This example shows a simple smiling face constructed entirely with SVG shapes, drawn on a red background. The face consists of a yellow circle for the head, two small rectangles for eyes, two circles for pupils, and a black arc for the mouth. The code uses D3 version 6 to select the SVG element, set its dimensions and background, and append the geometric primitives with chained `.attr()` calls. It also uses `d3.arc()` to generate the path data for the smile, demonstrating how D3’s arc generator can be used with SVG paths.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.