Skip to main content
100%

Creating a Smiley face with D3

✓ Published1🌍 Public
AAndy Chang
Last edited Sep 28, 2022
Created on Sep 28, 2022

A yellow smiley face rendered in SVG shows a mouth moving up and down while the entire face scales in size. D3 v7’s selection, `arc`, and `transition` APIs are used to construct the circle, eyes, and curved path for the mouth, with `setInterval` triggering repeated two-second transitions. Static SVG attributes position the face, while the mouth’s transform and the circle’s scale animate independently.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes