Skip to main content
100%

let's make a face with D3.js

✓ Published3🌍 Public
SShweta-tech
Last edited Jan 4, 2020
Created on Jan 4, 2020

This example builds a cartoon face using D3.js v5 and React, rendered as SVG shapes. It constructs a yellow circle for the head, white ellipses for the eyes, black circles for the pupils, and a path-based mouth generated with the `d3.arc()` API. The face is centered on a 1000x500 SVG canvas, with eye positions and mouth dimensions hard-coded rather than derived from data. The code uses D3 selections to append and style each shape, demonstrating basic geometric composition without any interactive or data-driven behavior.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes