Skip to main content
100%

Let's make a face with D3.js!

✓ Published4🌍 Public
Iianleekq
Last edited Feb 20, 2019
Created on Feb 11, 2019

A smiling face is constructed entirely from SVG shapes, with a yellow circular head, two dark eyes, eyebrows, and an arc-based mouth. The example demonstrates basic SVG composition and D3 selections, then animates the eyebrows by chaining `transition` calls to shift their vertical position. It uses D3 v5’s `select`, `arc`, and `attr` APIs to generate the mouth path and manage transform attributes. A centered `<g>` group positions all features, with fixed pixel constants controlling eye spacing and offsets.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes