Skip to main content
100%

a face with D3.js!, Migusti

✓ Published0🌍 Public
RRemustus
Last edited Sep 3, 2021
Created on Sep 3, 2021

A smiling face rendered in SVG animates as its eyebrows rise and fall, demonstrating fundamental DOM manipulation with D3.js. The code uses d3.select to append circle, rect, and path elements, positioning them via SVG transform attributes. Eyebrow movement is created with chained transition() and duration(2000) calls, while the mouth uses d3.arc with defined innerRadius, outerRadius, and start/end angles. The yellow face and black features are drawn entirely through D3’s data-join-free imperative API on a fixed 960×500 canvas.

AI-generated description

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

MIT Licensed

Similar vizzes