Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Ggarrettriha
Last edited Apr 3, 2019
Created on Apr 3, 2019

A smiley face built with SVG elements animates its eyebrows upward and back down in a loop. The example demonstrates fundamental D3.js DOM manipulation, using `d3.select` to append a yellow circle, two eyes, rectangular eyebrows, and an arc-based mouth constructed with the `d3.arc` helper. Two sequential `transition` calls with a 2000-millisecond duration move the eyebrow group via its `transform` attribute, showing basic chained animation without data binding. The face is centered on an empty 960×500 SVG canvas, with styling handled by an external stylesheet.

AI-generated description

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

MIT Licensed

Similar vizzes