Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Let's make a face with D3.js!

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed