Skip to main content
100%

Let's make a face with D3.js!

✓ Published2🌍 Public
MMunTatt Yap
Last edited Aug 2, 2019
Created on Aug 1, 2019

A smiley face rendered as SVG elements animates its eyebrows in a continuous loop. The example demonstrates fundamental D3.js DOM manipulation by selecting an SVG canvas, appending a centered group, and building the face from circles, rectangles, and an arc path. Eyebrows transition vertically using chained `transition().duration()` calls, moving down 50 pixels then returning. The code imports `select` and `arc` from D3 v5, constructing the mouth with the arc generator’s inner and outer radii and angle parameters.

AI-generated description

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

MIT Licensed

Similar vizzes