Skip to main content
100%

make a face in d3

✓ Published0🌍 Public
MMartin Casey
Last edited Feb 13, 2021
Created on Feb 12, 2021
Forked from svg shapes

This example shows a simple yellow face built from SVG shapes, with eyebrows that animate up and down in a looping transition. The code uses d3-selection to append a circle for the head, circles for the eyes, rectangles for the eyebrows, and an arc path for the mouth, all positioned relative to a centered group. The eyebrow animation is driven by chained `transition().duration()` calls that move the group’s transform attribute. The visualization renders entirely in SVG within a static 960×500 viewport.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes