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
SShady Mohammed
Last edited Dec 28, 2019
Created on Dec 27, 2019

A smiling face is drawn with D3.js as a yellow circle, complete with eyes, a mouth, and eyebrows that animate by moving up and down. The code uses D3's selection and DOM manipulation methods to build the SVG structure, while `transition().duration(1000)` creates the repeating eyebrow motion. The face is constructed using basic SVG shapes like `circle` for the head and eyes, a `path` for the mouth via D3's arc generator, and `line` elements for the eyebrows, all centered within an SVG canvas.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

Comments

Sign in to join the discussion.

MIT Licensed