Skip to main content
Public

Share visualization

Loading preview…

Let's make a face with a d3.js

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Let's make a face with a d3.js

0
Mmyoung1032
Last edited Jun 6, 2021
Created on Jun 6, 2021

A smiling face composed of SVG shapes is drawn with d3.js, featuring a yellow circular head, eyes, eyebrows, and a curved mouth. The eyebrows animate upward and back down using `transition.attr` on a `<g>` element. The code builds the face with d3 selections, `arc()` for the mouth path, and explicitly positioned ellipses and circles for the eyes, all rendered in an SVG canvas.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed