Skip to main content
100%

Fork of Let's make a face with D3.js!

✓ Published0🌍 Public
PPriya Tiwari
Last edited Oct 3, 2023
Created on Oct 3, 2023

A smiley face is drawn with D3.js v5, using SVG circles for the eyes and face, a path for the mouth, and rectangles for the eyebrows. The face is centered in an SVG canvas using a group transform. The eyebrows animate vertically over two seconds via chained `transition` calls, moving up and then back down. The code uses D3's `select`, `attr`, `append`, and `arc` APIs, with dimensions and offsets defined as constants.

AI-generated description

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

MIT Licensed

Similar vizzes