Skip to main content
100%

Lets make a face with D3

✓ Published0🌍 Public
Aaruba-haroon
Last edited Mar 24, 2020
Created on Mar 24, 2020

This example draws a stylized face in SVG using D3 v5, compositing a yellow circle for the head, two eyes, animated eyebrows, and a mouth path. The eyebrows are rectangles that toggle between two vertical positions over two seconds using D3's `transition` API, creating a subtle blinking or winking effect. The mouth is created with `d3.arc` to generate a crescent-shaped path. All geometry is positioned relative to the center of a 960×500 canvas, with coordinates computed from width and height attributes. The rendering relies on SVG elements and animation via chained transitions.

AI-generated description
MIT Licensed

Similar vizzes