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!

0
Ccacho2294
Last edited Apr 1, 2020
Created on Apr 1, 2020
Forked from Bowl of Fruit

A yellow face built with SVG circles, rectangles, and arcs animates its expressions. The face’s eyebrows shift downward and upward via chained `transition().duration()` calls, while a smile arc flips into a frown using the same timed transforms. The code constructs the face by appending SVG groups and shapes with d3 v5’s `select` and `arc` APIs, positioning elements relative to the center of a 960×500 SVG. Static facial features—eyes, irises, and a mouth—are drawn with basic geometry, while the background turns red through a direct DOM style update.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed