Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Mmoorephamily
Last edited Sep 26, 2018
Created on Sep 26, 2018

A D3.js animation demonstrates basic DOM manipulation by constructing a smiley face from SVG primitives. The face consists of yellow circles for the head and eyes, rectangular eyebrows, and a path-based mouth generated with the `d3.arc` shape. Using chained `transition` calls, the eyebrows animate downward and back over two-second intervals. The code imports `select` and `arc` from D3, appends elements to an SVG canvas, and applies coordinate transforms to position facial features relative to the center.

AI-generated description

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

MIT Licensed

Similar vizzes