Skip to main content
100%

Fork of D3-1: Making a face

✓ Published0🌍 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
MIT Licensed

Similar vizzes