Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
LLara Issa
Last edited Sep 27, 2020
Created on Sep 27, 2020

A yellow smiley face is drawn on an SVG canvas using D3.js, with circles for eyes, rectangles for eyebrows, and an arc-generated path for the mouth. The code uses d3.select to build the face elements and d3.arc to shape the mouth, while a chained transition animates the eyebrows moving up and down over two-second intervals. The face is centered via an SVG transform, and the animation runs in a loop, demonstrating basic DOM manipulation and state changes with D3 transitions.

AI-generated description

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

MIT Licensed

Similar vizzes