Skip to main content
100%

et's make a face with D3.js!

✓ Published0🌍 Public
AAya
Last edited May 18, 2021
Created on May 18, 2021

A smiley face rendered in SVG reacts with animated eyebrows as its eyes and mouth remain static. The demo builds the face using D3.js v5 selections to append a yellow circle, two eye circles, and a mouth path generated by the `arc` generator. The eyebrows, drawn as rectangles within a grouped transform, demonstrate chained `transition().duration()` calls to shift upward and back down over two seconds. The code imports `select` and `arc` directly from D3, and the entire face is centered via an SVG transform.

AI-generated description

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

MIT Licensed

Similar vizzes