Skip to main content
100%

Make a face with d3.js

✓ Published0🌍 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.

MIT Licensed

Similar vizzes