Skip to main content
100%

Let's make a face with D3.js!

✓ Published6🌍 Public
Ccledevoute
Last edited Jun 16, 2020
Created on Jun 16, 2020

This example displays a simple yellow face composed of SVG shapes, including eyes, eyebrows, and a mouth, all built programmatically with D3.js. The face is centered within a fixed viewport using a group transformation. The code uses D3’s `select` to target the SVG element and `append` to construct each shape, while the `arc` function generates the mouth’s path. An animated eyebrow movement is achieved by chaining multiple `transition().duration()` calls, which sequentially shift the eyebrow group’s vertical position.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes