🌍 Public
Viewing a saved revision (read-only)
b5e8c9380b6944bbb0256a56e0736da3
Let's make a face with D3.js!
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 descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.