Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make face with D3!

Public visualization

Viewing a saved revision (read-only)

e20092618d4c473a98e0bb65c632adfe

Let's make face with D3!

0 stars1🌍 Public
Kkhuton
Last edited Feb 16, 2020
Created on Feb 12, 2020

This example shows how to build a simple cartoon face using SVG primitives in D3. It draws a yellow circle for the head, two black circles for eyes, and an arc-based path for a mouth, all positioned relative to the SVG’s width and height. The code uses `d3.select` to access the SVG element, `append` to create shapes, and the `d3.arc` generator to compute the mouth’s path with inner and outer radii and specified angles. The face is centered horizontally and vertically, with fixed offsets for the eyes and mouth placement.

AI-generated description

A bare minimum HTML page.

See also React Starter.