Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Wwoo
Last edited Oct 2, 2020
Created on Oct 2, 2020

This example demonstrates a simple smiling face built entirely with SVG shapes, including a yellow circular head, two eyes, animated eyebrows, and an arc-based mouth. The code uses D3.js v6 selections to append and position elements, while `transition().duration()` creates the bouncing eyebrow animation. A single `d3.arc()` path generates the lips, and the central `g` transform centers the composition. The face is drawn with hard-coded geometry values for spacing and radius, without external data.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes