Skip to main content
100%

Let's make a face with D3.js!

✓ Published4🌍 Public
PPiotrekW2
Last edited Feb 26, 2019
Created on Feb 26, 2019

This example demonstrates how D3.js can manipulate SVG elements to create an animated smiley face with moving eyebrows. The code selects an `<svg>` element and uses D3’s data-binding and attribute methods to position facial features, while the eyebrow movement relies on D3 transitions. It renders entirely in-browser using D3 v5, with no external data source—the face is built from static shapes defined in `index.js`. The visual result is a playful, interactive-looking illustration of core D3 DOM manipulation techniques.

AI-generated description

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

MIT Licensed

Similar vizzes