Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3

Public visualization

Viewing a saved revision (read-only)

26fdca609afd4aee948b9ea30c49f807

Let's make a face with D3

0 stars1🌍 Public
JJuan Ore
Last edited May 18, 2020
Created on May 18, 2020

This example builds a simple cartoon face using SVG circles. It constructs a yellow head, two black eyes, and no other facial features. The code creates the face by directly appending `circle` elements to the `svg` with specific `cx`, `cy`, and `r` attributes. It uses the D3 v5 selection and mutation API, specifically `select('svg')` and `svg.append('circle')`, to position the elements based on the SVG's `width` and `height` attributes. The face is rendered using SVG, with styling applied via CSS.

AI-generated description

A bare minimum HTML page.

See also React Starter.