Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3-1: Making a face

Public visualization

Viewing a saved revision (read-only)

399177dd95ab49d1b3ba7e415a1ccc8d

Fork of D3-1: Making a face

0 stars0🌍 Public
Bbarryhillier
Last edited Jan 9, 2023
Created on Jan 9, 2023

This example assembles a basic, stylized face from SVG primitives using D3 version 7. It draws a yellow circle as the head, adds two blue eyes, a smile-shaped arc for the mouth, and two rectangular eyebrows, all positioned relative to the SVG canvas dimensions. The code demonstrates D3’s functional DOM selection via `d3.select` and attribute chaining, and it employs the D3 arc generator to create the path for the smile. The face’s components are placed using explicit pixel coordinates extracted from the SVG element’s width and height attributes.

AI-generated description