Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
YYuShuenWang
Last edited Sep 17, 2020
Created on Sep 17, 2020

A smiling face rendered as SVG shapes in D3.js v5 shows animated eyebrow movements. The code builds the face using `d3.select`, `d3.append`, and `d3.arc` to create a yellow circle head, two eyes, and a mouth. Eyebrows are rectangles that move up and down via chained `transition().duration()` calls, each lasting two seconds. The example demonstrates fundamental DOM manipulation with D3's imperative API, drawing all elements on a 960×500 SVG canvas.

AI-generated description

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

MIT Licensed

Similar vizzes