Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js

Public visualization

Viewing a saved revision (read-only)

0e8c254db3ea4f28b4a6eeb0d0697afc

Let's make a face with D3.js

0 stars1🌍 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