Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Gguangyi1012
Last edited Jan 25, 2020
Created on Jan 25, 2020
Forked from Danil's many faces

A simple SVG composition uses D3.js v5 to build and animate an abstract face. It binds an array of animal objects with red, yellow, and green types to three rectangles via `d3.scaleOrdinal` and `d3.schemeCategory10`, with click handlers that modify the data. A circle is appended and animated using `transition.attrTween`-style chained `.transition().delay().duration()` calls, moving, resizing, and recoloring from black to green. The rendering is static at first, then transitions over two seconds, all within a 960×500 SVG canvas.

AI-generated description

Halfway through smiley face (datavis 2020)

MIT Licensed

Similar vizzes