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
Kkartikaymanoj
Last edited Feb 9, 2020
Created on Feb 9, 2020

This example uses D3.js to build a cartoon face from basic SVG shapes, including a yellow circle for the head, circles for eyes, rectangles for eyebrows, and an arc-based path for the mouth. The code relies on D3’s `select`, `arc`, and `transition` APIs to arrange elements around a central group, with eyebrow positions animated through chained `transition.attr` calls that raise and lower them over 2 and 1 seconds. The rendered output is an SVG canvas sized 960 by 500 pixels, with styling defined in a linked CSS file.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed