🌍 Public
Let's make a face with D3.js!
This D3.js v5 example builds an animated smiley face from scratch using SVG shapes. The sketch programmatically constructs a yellow circle for the face, black eyes, rectangular eyebrows, and an arc path for the mouth on a 960-by-500 canvas. Using D3's selection and transition APIs, the code animates the eyebrow group's vertical position in a repeating two-second cycle, moving it up 50 pixels and back. The example demonstrates fundamental DOM manipulation, including `select`, `append`, `attr`, and chained `transition().duration()` calls, to create a simple, lively character.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed








Comments
Sign in to join the discussion.