🌍 Public
Viewing a saved revision (read-only)
5d0d69cf0c814e91823376c8446bc274
Let's make a face with D3.js!
This example demonstrates how to build an animated smiley face using D3.js, showing a yellow circle with eyes, eyebrows, and a mouth. The eyebrows first move upward over two seconds and then return to their original position, creating a simple raised-eyebrow animation. The code uses D3’s `select` and `append` methods to construct SVG elements, while the mouth is drawn with the `arc` shape generator. The eyebrow motion is driven by chained `transition` calls that animate the `transform` attribute.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.