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
TTiff
Last edited Jan 18, 2023
Created on Jan 18, 2023

This example creates a smiling face using basic SVG shapes—two circles for the eyes, a larger circle for the head, and an arc for the mouth—all positioned with fixed coordinates. The code uses D3.js v5 selection methods like `svg.append` and `.attr` to build the elements, alongside the `d3.arc` generator to define the mouth’s path based on inner and outer radii and start/end angles. The SVG canvas is 960 by 500 pixels, with styling applied via an external stylesheet.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed