Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
PPiotrekW2
Last edited Feb 26, 2019
Created on Feb 26, 2019

D3.js builds a smiley face from SVG shapes: a yellow circle, two eyes, rectangular eyebrows, and an arc-shaped mouth. The code uses `d3.select` and `d3.arc` to construct the face, then applies a chained `transition().duration(2000)` to repeatedly move the eyebrow group up and down, creating an animated expression. All elements are centered via a translation transform.

AI-generated description

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

MIT Licensed

Similar vizzes