Skip to main content
100%

Let's make a face with D3.js

✓ Published0🌍 Public
Lluckytrue
Last edited Mar 19, 2020
Created on Mar 19, 2020

A cheerful yellow face, built from SVG primitives, blinks its rectangular eyebrows up and down repeatedly. The example uses D3.js v5 selections and transitions to animate the facial features. A circle forms the head, two circles serve as eyes, and an arc path, generated with the `d3.arc()` helper, creates the mouth. The code constructs the face by appending SVG elements to a group and animates the eyebrows with chained `transition().duration()` calls.

AI-generated description

Loading the d3 script from UNPKG puts a d3 variable in the global namespace. (Take out "browse" from that link to load it.

MIT Licensed

Similar vizzes