🌍 Public
Viewing a saved revision (read-only)
76369ac83a2f44a4b22a1c290dcdfc92
Let's make a face with D3.js!
This example shows a yellow smiley face with eyes, eyebrows, and a mouth, rendered as SVG shapes. The eyebrows animate by moving up and down through a sequence of d3.transition() calls, each lasting 2000 milliseconds. The code builds the face by appending circle, rect, and path elements to the SVG, using D3.js v5 selection and arc() to define the mouth’s curved shape. The animation demonstrates fundamental DOM manipulation with D3’s append and attr methods.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.