Skip to main content
100%

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

✓ Published0🌍 Public
Jjamesbrittan
Last edited Apr 13, 2021
Created on Apr 13, 2021

A D3.js smiley face demonstrates declarative SVG manipulation with animated eyebrow movement. It constructs the face from basic shapes—yellow circle, eye circles, eyebrow rectangles, and an arc-generated mouth—positioned with transforms. The code uses `d3.select`, `attr`, and `append` to build the DOM, then chains `transition().duration(2000)` twice to raise and lower the eyebrows. The `arc` generator draws the mouth with specified inner/outer radii and angles, all rendered as static SVG geometry in a 960x500 viewport.

AI-generated description

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

MIT Licensed

Similar vizzes