Skip to main content
100%

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

✓ Published0🌍 Public
RRamola Shishupal
Last edited Apr 14, 2021
Created on Apr 14, 2021

This example uses D3.js v5 to animate a smiley face built entirely from SVG shapes. It shows a yellow circle with two eyes, animated eyebrows that move up and down repeatedly, and a mouth drawn as an arc. The code manipulates the DOM directly, using `d3.select` to target the SVG element and `append` to add each facial feature. The eyebrow animation is achieved through chained `transition` calls that alternate the transform attribute, while the mouth’s curved path is generated with the `d3.arc` function.

AI-generated description

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

MIT Licensed

Similar vizzes