🌍 Public
Viewing a saved revision (read-only)
d9b6ba94982e4d1e8ccf4c490d991618
Fork of Let's make a face with D3.js!
This example shows a simple SVG smiley face built entirely with D3.js selections. The code creates a red circle, two eyes, and a curved mouth, then animates the eyebrows upward and back down using chained transitions. It uses d3-selection to append and style elements, d3-shape’s `arc()` to generate the mouth path, and `transition.attr` with a 5-second duration to move the eyebrow group. The face is centered via a translated `<g>` group, with layout based on fixed pixel offsets.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.