Skip to main content
100%

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

✓ Published0🌍 Public
Ccharkaoui
Last edited May 31, 2021
Created on May 31, 2021

This example demonstrates a smiley face built with D3.js, whose eyebrows animate in a continuous loop. An SVG circle forms the yellow head, with additional circles for eyes and a path created with the `arc` function for the mouth. The animation is driven by chained `transition()` calls on the eyebrows group, which move the eyebrows down and back up over a two-second interval each way. The code uses d3 v5 and relies on the `select`, `append`, and `attr` methods to manipulate the SVG DOM elements directly.

AI-generated description

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

MIT Licensed

Similar vizzes