Skip to main content
100%

Make a face with D3.js

✓ Published0🌍 Public
TTapiwa Lason
Last edited Jun 23, 2020
Created on Jun 23, 2020

A smiling face made of SVG shapes is drawn with D3.js v5. The face uses a yellow circle, black-outlined eyes, rectangular eyebrows, and an arc-based mouth. A chained `transition` repeatedly raises and lowers the eyebrows over two-second intervals. The code imports `select` and `arc` from the D3 library, positions elements with SVG attributes, and animates the eyebrow group via `transition.attr`. The example demonstrates basic SVG composition and D3 transitions on a 960×500 canvas.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes