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

1
SShweta-tech
Last edited Jan 4, 2020
Created on Jan 4, 2020
Forked from HTML Starter

This example shows how to construct a simple cartoon face using basic D3.js shapes in an SVG canvas. A yellow circle forms the head, two white ellipses with black inner circles create the eyes, and a black path draws the mouth. The code uses D3 v5 with React, selecting the SVG element and appending shapes with attributes for position, size, and fill. The mouth is generated using the `d3.arc()` function with defined inner and outer radii and angles, while other shapes rely on direct attribute assignment rather than data binding.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed