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)

00b9fed0fdc645219ac6273084441450

Let's make a face with D3.js!

0 stars0🌍 Public
WWill Bainton
Last edited Jul 23, 2020
Created on Jul 22, 2020

This example uses D3.js to draw a simple, static cartoon face on an SVG canvas. It shows a yellow circular head, two colored eyes (dodger blue and tomato), and a black mouth created with an arc path. The code uses D3's `select` to target the SVG element, `append` with `circle` and `path`, and the `arc` generator to define the mouth’s geometry based on inner/outer radii and angle ranges. Positions are computed relative to the canvas center, and styling is applied via SVG attributes.

AI-generated description