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)

877b87ba648e4d41976388ef47658e60

Let's make a face with D3.js

0 stars0🌍 Public
Kkenneth
Last edited Sep 7, 2019
Created on Sep 7, 2019

This example demonstrates how to construct a simple cartoon face using SVG shapes. The code builds a yellow circle for the head and two black circles for the eyes, all positioned relative to the SVG's width and height. It uses D3.js version 5's selection and attribute methods—`select`, `append`, and `attr`—to create and style the shapes dynamically. The styling is handled through inline attributes for stroke and fill, with the SVG canvas set to 960 by 500 pixels.

AI-generated description