Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js

Public visualization

Viewing a saved revision (read-only)

a44104e89293424bbed66c191e757a4c

Let's make a face with D3.js

0 stars2🌍 Public
MMike Wolfgram
Last edited Sep 9, 2019
Created on Sep 9, 2019

This example uses D3.js to construct a simple animated face from SVG shapes. It shows a yellow circle as the head, two eyes, and eyebrows that move up and down via chained `.transition()` calls over two seconds each, plus a mouth drawn as an arc. The code relies on D3's selection API (`d3.select`) and the `d3.arc` generator to define the mouth's path, with all elements grouped and translated to center the face.

AI-generated description

An example including some commonly used features of SVG.