Skip to main content
100%

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

✓ Published0🌍 Public
Ddhanushkar006
Last edited Sep 21, 2023
Created on Sep 21, 2023

This example builds a smiley face out of SVG shapes—a yellow circle, two eyes, and a mouth drawn with `d3.arc()`—and animates its rectangular eyebrows by chaining two `transition().duration()` calls. The code selects the SVG element with `d3.select`, appends a group for centering, and transitions the eyebrow container between two vertical offsets, creating a bobbing motion. It demonstrates fundamental DOM manipulation and chained transitions using D3 v5 without external data.

AI-generated description

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

MIT Licensed

Similar vizzes