Skip to main content
100%

Let's make a face with D3.js!

✓ Published2🌍 Public
Tthanhtrant219
Last edited Apr 12, 2020
Created on Apr 12, 2020
Forked from HTML Starter

This example shows a cheerful yellow face built entirely with D3.js v5 in a React framework, rendered as animated SVG. The code uses `select` to target the SVG, `circle` elements for the eyes and face, `rect` elements for eyebrows, and a `path` generated with the `arc()` API for the mouth. The eyebrows animate via chained `transition().duration(2000)` calls, moving up and down over four seconds. The face is centered using a `g` transform, and no external data is used—only hardcoded dimensions and coordinates.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes