Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Kkaylee4m
Last edited Mar 17, 2019
Created on Mar 17, 2019

A D3.js animation builds a smiley face from SVG primitives: red circle head, two eyes, a mouth formed by an arc path, and rectangular eyebrows. The eyebrows are the focus, moving up and down through chained `transition().duration()` calls on a group's `transform` attribute. The code demonstrates fundamental DOM manipulation using methods like `select`, `append`, and `attr`, and computes the face's layout from the SVG's width and height attributes.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes