Skip to main content
Public

Share visualization

Loading preview…

D3 Face

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

D3 Face

0 stars2Public
YYoung Song
Last edited Jun 23, 2022
Created on Jun 16, 2022
Forked from D3 Starter

This example draws a cartoon face from SVG shapes. A yellow circle forms the head, two black circles serve as eyes, and a mouth is rendered as a dark arc using the `d3.arc()` helper. The coordinate positions and radii for the face, eyes, and mouth are calculated from the SVG’s width and height attributes. The code imports `select` and `arc` from D3 v7 and appends all elements to an SVG with an orange background.

AI-generated description
  • Loading d3.js
  • Importing d3 function using ES6
  • Creating a face using SVG and d3

Comments

Sign in to join the discussion.

MIT Licensed