Skip to main content
100%

Let's make face with D3

✓ Published2🌍 Public
JJasonXu1244
Last edited Sep 23, 2020
Created on Sep 22, 2020
Forked from SVG

This example draws a simple cartoon face using D3.js v6, rendered as SVG elements with a short animation. It shows a yellow circle as the head, two black circles for eyes, and an arc-based mouth that transitions from a filled semicircle to a hollow crescent shape over two seconds. The code uses D3 selections, the `arc` generator for the mouth path, and a chained `transition().duration()` to animate the shape change. The face is centered within a 960×500 SVG canvas, with hardcoded positions for facial features.

AI-generated description
MIT Licensed

Similar vizzes