🌍 Public
Viewing a saved revision (read-only)
86630d64b8db4354be87f5a386dde34c
Let's make a face with D3.js!
A D3.js smiley face demonstrates basic DOM manipulation and chained transitions by animating raised eyebrows. Built from SVG primitives—circles for the face and eyes, rectangles for eyebrows, and an arc-generated path for the mouth—the code uses d3.select and d3.arc with explicit positional variables. The eyebrows move via transition().duration(2000) calls that shift the group’s transform attribute between two vertical offsets, creating a repeating motion. The example uses d3.v5 and renders entirely in SVG within a fixed 960x500 viewport.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.