🌍 Public
Viewing a saved revision (read-only)
20532b8678ce4394b7b81f21873736e3
Let's make a smiley face with D3.js
A yellow smiley face is drawn in SVG using D3.js v5, with a circle for the head, two eyes, rectangular eyebrows, and an arc-based mouth generated with the `arc` helper. The eyebrows animate vertically via chained `transition().attr()` calls, moving down then returning over four seconds. The SVG dimensions are read directly from the markup, and the face is centered using a translated `<g>` group. The example demonstrates basic SVG shape creation and D3 transitions.
AI-generated descriptionAn example including some commonly used features of SVG.