Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
DDuyun Tan
Last edited Feb 24, 2020
Created on Feb 24, 2020

A yellow smiley face is drawn with D3.js using SVG circles and a path for the mouth, generated with the `arc` helper. The face's eyebrows, rendered as rectangles, animate upward and back down via chained `transition` calls with a 2000-millisecond duration. The code demonstrates fundamental DOM manipulation through D3 selections, appending elements to an SVG group, and using attribute setters with numeric values derived from the viewport dimensions.

AI-generated description

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

MIT Licensed

Similar vizzes