Skip to main content
100%

a_face_withD3

✓ Published0🌍 Public
WWhoIN Lee
Last edited Aug 26, 2021
Created on Aug 26, 2021

A yellow smiley face with moving eyebrows demonstrates basic DOM manipulation in D3.js v5. The face is built using SVG circles, rectangles, and an arc-generated mouth, centered within a 960×500 viewport. The eyebrows animate vertically via chained `transition().duration()` calls, shifting down 50 pixels and back over two seconds. The code imports `select` and `arc` from D3, using data-driven attributes to position facial features relative to the canvas.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes