Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Make a face with d3.js

Public visualization

Viewing a saved revision (read-only)

c6d53606f07c4f2b9fabaaf3f0de8f44

Make a face with d3.js

0 stars0🌍 Public
Vvietiscool
Last edited Feb 2, 2021
Created on Feb 2, 2021

This example uses d3.js to draw a smiling face directly in SVG. A yellow circle forms the head, with two smaller black circles for eyes and an arc-generated path for the mouth. The code positions elements by translating to the center of an SVG canvas and uses d3’s `select` and `arc` API to create shapes, all rendered with fixed pixel coordinates.

AI-generated description

An example including some commonly used features of SVG.