Skip to main content
100%

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

✓ Published0🌍 Public
ZZaid0914
Last edited Oct 3, 2023
Created on Oct 3, 2023

This example builds a yellow smiley face with D3.js version 5, demonstrating fundamental DOM manipulation and animation. It constructs the face using SVG circles for the eyes and an `arc` generator for the mouth, while the eyebrows are rectangles that move via chained `transition().duration()` calls. The code uses D3’s `select` to bind to an SVG element and positions elements through translation transforms. The animation cycles the eyebrows up and down over two-second intervals, showcasing basic enter-update-exit patterns without any external data source.

AI-generated description

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

MIT Licensed

Similar vizzes