Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
AAravind Subramaniam
Last edited Jan 19, 2020
Created on Jan 17, 2020

This example uses D3.js v5 to draw a cartoon face from SVG primitives. A yellow circle forms the head, with positioned circles for eyes and arcs for a mouth, all centered via a group transform. The code constructs these shapes using `select`, `arc`, and attribute setters, while a `transition().duration()` sequence animates the eyebrows upward and back down over several seconds, creating a simple facial expression.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes