Skip to main content
Public

Share visualization

Loading preview…

make 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

make face with D3.js

1
SSuzie1022susu
Last edited Jan 9, 2023
Created on Jan 9, 2023

Built with D3.js v7, this example draws a smiling yellow face as an SVG graphic. The code constructs circles for the eyes, rectangles for the eyebrows, and an arc-generated path for the mouth, all positioned using SVG transforms. Animated transitions, using `transition().duration()`, move the eyebrows up and down over two seconds. The face is centered within a 960 by 500 pixel viewport, with the visualization rendered entirely through SVG elements.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed