Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
Ssureshreddypr
Last edited Jul 30, 2020
Created on Jul 30, 2020

This example shows a yellow smiley face drawn in SVG, whose right eyebrow animates upward while the left remains still. It demonstrates basic DOM manipulation with D3.js v5, using `d3.select` to append circles, rectangles, and an arc-generated path for the mouth. The code relies on D3’s `arc` generator for the smile and `transition` with a 2-second duration to move the eyebrow. All shapes are positioned via SVG attributes like `cx`, `r`, and `transform`, with a static yellow face and black features.

AI-generated description

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

MIT Licensed

Similar vizzes