Skip to main content
100%

Let's make a face with D3.js!

✓ Published2🌍 Public
Lliunaiming
Last edited Jul 19, 2019
Created on Jul 19, 2019

This example demonstrates how to build an animated smiley face using D3.js, with eyebrows that move up and down over time. It shows fundamental DOM manipulation by selecting SVG elements and appending shapes like circles, rectangles, and an arc-based mouth. The code uses `d3.select`, `d3.arc`, and chained `transition.attr` calls to animate the eyebrow group’s vertical position. The face is drawn entirely with SVG, centered in a 960×500 viewport, and the animation runs continuously without external data.

AI-generated description

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

MIT Licensed

Similar vizzes