Skip to main content
100%

Let's make a face with D3.js

✓ Published0🌍 Public
Mmarci640
Last edited Jun 22, 2020
Created on Jun 21, 2020
Forked from Hello VizHub

This example builds a yellow smiley face in an SVG canvas using D3.js v5 within a React framework. The face is constructed from primitive shapes: a circle for the head, two circles for the eyes, and an arc path for the mouth, all positioned relative to the center of the viewport. The code uses D3’s `select` and `append` to build the scene, and employs a `transition` on the eyebrows to animate them over ten seconds, rotating them via a CSS `transform`. The entire composition is rendered as static SVG, with the animation handled through D3’s transition system.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes