Skip to main content
100%

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

✓ Published0🌍 Public
Ssandeepss2020
Last edited Mar 17, 2023
Created on Mar 17, 2023

This example builds a smiling face from basic SVG shapes using D3.js v5, with a yellow circle for the head, black circles for eyes, a curved path for the mouth, and rectangular eyebrows. The eyebrows animate by transitioning the eyebrow group’s translate attribute in two successive two-second intervals, moving them upward and then back down. The code uses D3’s `select`, `arc`, and `transition` APIs, and renders everything to SVG within a fixed 960×500 viewport. No external data is loaded; all geometry is defined directly in the script.

AI-generated description

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

MIT Licensed

Similar vizzes