🌍 Public
Viewing a saved revision (read-only)
c867889aca214a83a579828194641145
Let's make a face with D3.js!
This example uses D3.js v5 to construct a smiley face from scratch, with interactive eyebrows that move. It demonstrates fundamental DOM manipulation by selecting an SVG element and appending shapes such as circles and paths via D3’s `select`, `append`, and attribute-setting methods. The code relies on the `d3.min.js` library loaded from a CDN and renders entirely in SVG. Simple CSS sets the page margin and hides overflow, while a bundled JavaScript file drives the facial features’ static and animated properties.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.