🌍 Public
Viewing a saved revision (read-only)
b1c40a50cb6144f69c132c24313183ef
Fork of Fork of Let's make a face with D3.js!
This example demonstrates fundamental DOM manipulation with D3.js by animating a smiley face whose eyebrows move up and down. It shows how to build the SVG face from basic shapes—circles for the eyes, rectangles for the eyebrows, and an arc for the mouth—before applying a two-stage transition to the eyebrow group. The code uses d3-selection and d3-shape’s `arc()` to construct the path, with `transition().duration()` chaining to create the animated eyebrow movement. The face is centered using an SVG group with a translated transform.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.