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

3
SShweta-tech
Last edited Jan 4, 2020
Created on Jan 4, 2020

This example builds a cartoon face using D3.js v5 and React, rendered as SVG shapes. It constructs a yellow circle for the head, white ellipses for the eyes, black circles for the pupils, and a path-based mouth generated with the `d3.arc()` API. The face is centered on a 1000x500 SVG canvas, with eye positions and mouth dimensions hard-coded rather than derived from data. The code uses D3 selections to append and style each shape, demonstrating basic geometric composition without any interactive or data-driven behavior.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed