Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
RRisabh Raj
Last edited Sep 9, 2021
Created on Sep 7, 2021

This example builds a cartoon face entirely with D3.js v7, rendering geometric shapes as SVG elements. A yellow circle forms the head, while two circles create eyes and rectangles form eyebrows, all positioned with explicit coordinate offsets. The mouth is drawn using the `arc()` generator with specified inner and outer radii. The code selects an SVG element and appends groups to translate the face to the canvas center, demonstrating basic D3 shape generation and SVG transformation.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes