Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
CCameron
Last edited Jun 29, 2020
Created on Jun 29, 2020

A yellow smiley face is drawn in SVG using D3.js v5. Its eyes and mouth are static, while its rectangular eyebrows animate upward and back down via chained `transition` calls on a group element. The code uses `d3.select` and `d3.arc` to construct the face, with all positions and dimensions defined as numeric constants. The animation runs once over four seconds, demonstrating basic DOM manipulation and data-driven shape creation with D3.

AI-generated description

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

MIT Licensed

Similar vizzes