Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Nnawendusingh
Last edited Sep 14, 2019
Created on Sep 14, 2019

A smiling yellow face is drawn in SVG with D3.js, featuring eyes and a mouth created from an arc path. The example demonstrates basic DOM manipulation and transitions as the eyebrows animate upward and back down over two seconds. Using d3.select, arc, and attr, the code builds the face from a circle, rectangles, and a path, while the transition method moves the eyebrow group between vertical offsets. The face is centered within a 960 by 500 SVG canvas using a translated group element.

AI-generated description

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

MIT Licensed

Similar vizzes