🌍 Public
Viewing a saved revision (read-only)
3cb5e860686f4dada682f5d1b1931410
Let's make a face with D3.js!
This example demonstrates how to construct a smiley face using basic D3.js SVG elements, with static eyebrows positioned above two circular eyes and a small rectangular mouth. The code imports `select` and `arc` from D3 v5, creates an SVG group centered via a `translate` transform, and appends a yellow circle with a black stroke as the face. The rendering approach relies on manual coordinate attributes (`cx`, `r`, `x`) rather than data binding, showing fundamental DOM manipulation with `d3.select` and `selection.append`.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.