Skip to main content
100%

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

✓ Published0🌍 Public
Jjit-bose-10
Last edited Aug 29, 2021
Created on Aug 29, 2021

This example uses D3.js v5 to build a yellow smiley face with animated eyebrows. It starts by appending SVG elements—circles for the face and eyes, rectangles for eyebrows, and a path for the mouth—transformed to center the drawing. The eyebrows repeat a two-second transition sequence that moves them upward and back down via `transition.attr()`. The code imports `select` and `arc` from D3 to construct the mouth shape, relying on static coordinates and no external data.

AI-generated description

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

MIT Licensed

Similar vizzes