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!

2
Jjesramyep1263
Last edited Mar 20, 2020
Created on Mar 20, 2020

The example constructs a cartoon face from simple geometric shapes using D3.js v5 and SVG rendering. It employs `d3.select` to append circles and paths directly to an SVG container, with `d3.scaleOrdinal` mapping color values for facial features. The face is composed entirely of static elements—no animation or interaction—and the code relies on basic D3 utilities like `d3.arc` for the mouth shape. Styling is handled via an external stylesheet that resets margins and hides overflow. The visual result demonstrates how D3's declarative DOM manipulation can build complex illustrations from primitive SVG components.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed