Skip to main content
Public

Share visualization

Loading preview…

Let's make a face with 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 D3.js

4
JJoachim Klug
Last edited Sep 11, 2020
Created on Sep 11, 2020

A yellow smiley face is drawn in SVG, with circles for eyes, rectangles for eyebrows, and a path created using the d3.arc generator for the mouth. The face animates as the eyebrow group performs a transition.attr on its transform, moving up and down over two seconds in each direction. Built with D3 v6, the code uses select to target the SVG element and applies geometric attributes like cx, cy, r, and rotation transforms to compose the facial features.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed