Skip to main content
100%

Let's make a face with D3.js!

✓ Published2🌍 Public
Wwsupko
Last edited Apr 15, 2019
Created on Apr 15, 2019

This example builds a simple orange smiley face using D3.js v5 and SVG primitives, including circles, rectangles, and a path created with the `d3.arc` generator for the mouth. The face is centered via a group transform, with eyebrows animated upward and back down using chained `transition.attr` calls over two seconds each. The code explicitly sets dimensions from the SVG attributes and uses fixed pixel offsets for eye spacing and eyebrow placement, demonstrating basic SVG rendering and animation without external data.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes