Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
SStellaSong1
Last edited Nov 13, 2020
Created on Nov 13, 2020

This is an animated smiley face built with D3.js (v5) that demonstrates fundamental DOM manipulation. The face is constructed from SVG primitives, including a yellow circle for the head, two circles for eyes, and a path created with the `d3.arc` API for the mouth. The example uses D3's `transition().duration(2000)` to animate the eyebrows (rectangles) moving up and down in a two-step sequence. The entire composition is centered within an SVG canvas using an SVG transform.

AI-generated description

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

MIT Licensed

Similar vizzes