Skip to main content
100%

Lets make a face with D3

✓ Published1🌍 Public
TTajallah-maryam
Last edited Mar 23, 2020
Created on Mar 23, 2020

This example builds a friendly cartoon face using D3 v5 shape and selection APIs within a React framework, rendering to SVG. It shows a yellow circular head with two eyes, rectangular eyebrows, and an arc-based smile positioned around a central group, all hardcoded with fixed pixel dimensions. The code uses `d3.select`, `d3.arc` for the mouth path, and SVG `circle`, `rect`, and `path` elements appended with attribute setters. No external data is loaded; the visualization is purely programmatic, with layout derived from the SVG's width and height attributes.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes