Skip to main content
100%

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

✓ Published0🌍 Public
Nnehabaddam
Last edited Feb 23, 2023
Created on Feb 17, 2023

A smiling face assembled from SVG primitives demonstrates fundamental D3.js DOM manipulation. The code uses D3 v5 selections, `append`, and `attr` to build the face features in a central `<g>` element, including ears, eyes, eyebrows, nose, mouth, teeth, tongue, hair, hat, and collar. A chained `transition` with `duration` animates the eyebrows moving up and down over four-second intervals. The example emphasizes basic shape construction with `d3.arc` and direct attribute setting, rendering entirely as animated SVG.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes