Skip to main content
100%

Fork of Fork of Let's make a face with D3.js!

✓ Published0🌍 Public
Nnsatyaprakash22
Last edited Feb 23, 2023
Created on Feb 17, 2023

This example demonstrates DOM manipulation with D3.js by constructing a smiley face from SVG shapes, complete with a sky-blue head, eyes, nose, mouth, and ears. The most notable behavior is the animated movement of the eyebrows, which shift upward and then return to their original position over a two-second cycle. The code uses D3 v5 and the `select` and `append` functions to build the SVG structure, and it leverages chained `transition` calls to animate the eyebrows' transform attribute. The SVG canvas is 960 by 500 pixels, and the face is centered within it.

AI-generated description

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

MIT Licensed

Similar vizzes