Skip to main content
100%

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

✓ Published0🌍 Public
NNiharikapabbathi08
Last edited Jun 18, 2022
Created on Jun 18, 2022

A D3.js example builds a yellow smiley face with animated eyebrows using fundamental DOM manipulation. The face is drawn with SVG circles for the eyes and a path created via the `d3.arc()` generator for the mouth. Eyebrow rectangles transition vertically upward and back down over two 2-second intervals using chained `transition()` calls. The code selects the SVG element, applies transforms to center the face, and uses static data attributes like `eyeSpacing` and `eyeRadius` to position features, rendering entirely in the browser with d3.v5.

AI-generated description

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

MIT Licensed

Similar vizzes