Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a face with D3.js!

Public visualization

Let's make a face with D3.js!

0 stars1🌍 Public
Ffc248017
Last edited Dec 1, 2020
Created on Dec 1, 2020

This example shows how to construct a simple cartoon face using D3.js v6 within a React framework, rendered as SVG shapes. It draws a yellow circular head with black eyes and a smiling mouth using the `d3.select` and `d3.arc` APIs. The code reads the SVG’s width and height attributes, positions the face elements relative to the center, and uses an arc generator to create the mouth path. The visualization demonstrates basic shape manipulation and layout without any external data source, relying purely on hardcoded constants for spacing.

AI-generated description

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

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed