Skip to main content
100%

Let's make a face with D3.js

✓ Published1🌍 Public
PPiotrekW2
Last edited Feb 19, 2019
Created on Feb 19, 2019

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
MIT Licensed

Similar vizzes