Skip to main content
100%

03_Let's make a face with D3.js!

✓ Published0🌍 Public
LLuiz Domingues
Last edited May 15, 2022
Created on May 15, 2022

A yellow smiley face is drawn on an SVG canvas using D3.js, with circles for the eyes, a mouth formed by the `d3.arc` generator, and rectangular eyebrows that animate upward and back down via chained `transition` calls over two seconds each. The code selects the SVG element, positions a group at its center, and uses D3's modular imports (`select`, `arc`) to construct and manipulate shapes. The eyebrows' movement demonstrates basic DOM updates through D3's data-join-free attribute transitions.

AI-generated description

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

MIT Licensed

Similar vizzes