🌍 Public
Viewing a saved revision (read-only)
0b58292328ec48ac95ef120ffca44f3c
Let's make a face with D3.js
This example uses D3.js v5 to draw a simple face on an SVG canvas. It creates a single yellow circle with a black stroke, positioned at the center of a 960-by-500 pixel SVG element. The code retrieves the SVG’s dimensions via `attr` calls and uses `svg.append('circle')` to place the shape, setting its radius to half the canvas height. The visualization demonstrates basic SVG shape construction with D3’s selection and attribute methods.
AI-generated description