Skip to main content
100%

Lets Make a Face with D3 Format

✓ Published5🌍 Public
227-12-95
Last edited Feb 21, 2020
Created on Feb 19, 2020
Forked from HTML Starter

This example uses D3 v5 to render a simple cartoon face as an SVG. The face is constructed from primitive shapes—a yellow circle for the head, black circles for eyes, rectangles for eyebrows, and an arc for the mouth—all centered within a 900x500 viewport. The code leverages D3’s `select` API to access the SVG element and `arc` to generate the mouth’s path, with positions and sizes controlled by explicitly defined numeric constants. No external data source is used; the visualization is purely procedural, built directly through D3’s imperative SVG manipulation within a React context.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes