Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
GGray1011
Last edited Jun 26, 2019
Created on Jun 26, 2019

A yellow smiley face is drawn using D3.js v5's `select` and `arc` APIs, with SVG circles for the eyes and a path for the mouth. The eyebrows, rendered as rectangles, animate upward and back downward over four seconds via chained `transition().duration(2000)` calls. The code demonstrates fundamental DOM manipulation by building the face from scratch in an SVG container, using hardcoded dimensions and positions.

AI-generated description

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

MIT Licensed

Similar vizzes