Skip to main content
100%

D3Training

✓ Published0🌍 Public
Kkkkyeung
Last edited Apr 2, 2021
Created on Apr 2, 2021

This example uses D3.js v6 to create an animated smiley face, demonstrating fundamental DOM manipulation through chained method calls. An SVG canvas displays a yellow circle with black stroke as the face, containing eyes, eyebrows, and a mouth. The eyebrows are rectangles that automatically animate upward and then back down using sequential `.transition().duration(2000)` calls on a group element. The face is centered using a translate transform, while the mouth is drawn with the `arc()` generator from D3.

AI-generated description

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

MIT Licensed

Similar vizzes