Skip to main content
100%

Let's make a face with d3.js!

✓ Published0🌍 Public
Ccacho2294
Last edited Apr 1, 2020
Created on Apr 1, 2020
Forked from Bowl of Fruit

A yellow face built with SVG circles, rectangles, and arcs animates its expressions. The face’s eyebrows shift downward and upward via chained `transition().duration()` calls, while a smile arc flips into a frown using the same timed transforms. The code constructs the face by appending SVG groups and shapes with d3 v5’s `select` and `arc` APIs, positioning elements relative to the center of a 960×500 SVG. Static facial features—eyes, irises, and a mouth—are drawn with basic geometry, while the background turns red through a direct DOM style update.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes