Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Lleewardsmain
Last edited Oct 10, 2019
Created on Oct 10, 2019

This example builds a yellow smiley face with D3.js, featuring two eyes, a curved mouth, and animated eyebrows that move up and down. It demonstrates fundamental DOM manipulation by selecting an SVG, appending circles, rectangles, and a path created with the `arc` generator, and using `transition` to animate the eyebrow group’s transform attribute. The face is centered via a translated group, with all elements sized relative to the SVG’s dimensions. Rendering is SVG-based with a two-second transition loop.

AI-generated description

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

MIT Licensed

Similar vizzes