Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
VVijay2051
Last edited Jul 8, 2019
Created on Jul 8, 2019

A yellow smiley face with animated eyebrows demonstrates basic SVG creation and DOM manipulation using D3.js. Code builds the face from circles, rectangles, and an arc path generated with the `d3.arc` helper, all centered within an SVG element. Eyebrows move via chained `transition().duration()` calls that shift their vertical position. The example relies on D3 selections, attribute setters, and the `select` function, with no external data source. The face renders as static SVG geometry aside from the transitioning eyebrow rectangles.

AI-generated description

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

MIT Licensed

Similar vizzes