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)

a1223fc9cbbe450ba8ba21163d1acc2c

Fork of D3-1: Making a face

0 stars0🌍 Public
EEmnaAbbes
Last edited Jan 13, 2023
Created on Jan 13, 2023

This example builds a cartoon face out of basic scalable vector graphics (SVG) shapes within a 960 by 500 canvas. It shows a yellow circle for the head, two blue eyes, a black-outlined mouth, and two rectangular eyebrows. The code uses D3 v7 selection and attribute methods, such as `d3.select` and `.attr`, to manipulate SVG elements, and the `d3.arc` API to generate the mouth's path. All coordinates are derived from the SVG's width and height attributes, with groups applied to style the eyes collectively.

AI-generated description