🌍 Public
Viewing a saved revision (read-only)
caddf749cb0f43a7bbf5d0e8e6daea85
Lets make a face with D3
This example uses D3 v5 to draw a simple smiling face entirely in SVG. It appends a yellow circle for the head, two black circles for eyes, and a mouth path created with the `d3.arc` generator, using inner and outer radii with specified start and end angles. The `select` function targets the SVG element, and attribute values like height and width are read directly from the markup. No external data is loaded; all shapes are positioned based on the SVG’s dimensions and fixed pixel offsets.
AI-generated descriptionAn example including some commonly used features of SVG.