Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Viewing a saved revision (read-only)

5a693ad018fc4fa986db2f4169081113

Let's make a face with D3.js!

0 stars0🌍 Public
DDayalghosh
Last edited Jul 15, 2019
Created on Jul 15, 2019

This example shows how to build a simple smiley face with D3.js, using SVG circles to represent facial features and animated eyebrows that move in response to a timer. The code demonstrates fundamental DOM manipulation by selecting the SVG element, appending circles with positional and styling attributes, and using D3's selection methods to update the eyebrow positions over time. The face is drawn with a yellow circle for the head and additional circles or paths for eyes, eyebrows, and a mouth, all rendered in a 960×500 viewport.

AI-generated description

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