Skip to main content
100%

Fork of Let's make a face with D3.js

✓ Published0🌍 Public
Ssolarmic2015
Last edited Jun 29, 2022
Created on Jun 29, 2022

This example builds a simple smiling face using D3.js v5 within a React-free HTML page, rendering to SVG. The face is composed of a yellow circle, two eyes, eyebrows, and a mouth drawn with `d3.arc()`. The eyebrows animate up and down using chained `transition().duration()` calls, shifting their group’s `transform` attribute. Static positioning relies on absolute pixel values from the SVG’s width and height, and all shapes are appended to a central `<g>` element.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes