Fork of Let's make a face with D3.js!
✓ Published0🌍 Public
The example shows a yellow smiley face with animated eyebrows that move up and down, while the eyes and mouth remain static. It demonstrates fundamental DOM manipulation in D3.js v5, using a single SVG canvas as the rendering target. The code builds the face by appending SVG elements—circles for the head and eyes, rectangles for eyebrows, and a path for the mouth—through D3’s selection, arc-approximation, and transition APIs. Eyebrow movement is driven by two sequential `transition().duration()` calls that adjust the eyebrow group’s transform attribute over time.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed