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

1 star2🌍 Public
HHalima-Ali
Last edited Oct 12, 2022
Created on Sep 6, 2022

This example displays a cheerful cartoon face built entirely with D3.js SVG elements. A yellow circle forms the head, while smaller circles create the eyes and a path generated with the `d3.arc()` function draws the smile. The code constructs the face by appending grouped shapes to an SVG canvas, and the eyebrows animate up and down using chained `transition()` calls with a two-second duration each. The face is centered by translating a group element based on the SVG's height and width.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed