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)

56991629837a454eb4a0f55855527f6c

Let's make a face with D3.js!

0 stars0🌍 Public
Ssourcebox-bug
Last edited Apr 10, 2019
Created on Apr 10, 2019

This example shows how to build a smiley face with animated eyebrows using D3.js and SVG. It uses D3’s `select` and `arc` APIs to create circles for the eyes and face, and a path for the mouth, while the eyebrows are not yet implemented in the sampled code. The face is drawn on an SVG canvas sized 960 by 500 pixels, with yellow fill and black stroke. The code demonstrates fundamental DOM manipulation and attribute setting with D3 v5.

AI-generated description

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