Skip to main content
Public

Share visualization

Loading preview…

Lets 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

Lets make a face with D3.js

4
NNeepaB
Last edited Dec 11, 2020
Created on Dec 11, 2020

A cartoon face is drawn using SVG shapes: a yellow circle forms the head, two circles become eyes, and rectangles serve as eyebrows. The D3.js library is used to select the SVG canvas, position elements with coordinate transformations, and draw the mouth using the `arc` API. The eyebrows animate, moving upward and returning to their original position via chained `transition().duration()` calls. The face is centered within a 960 by 500 pixel SVG viewport, and the code is structured for React using D3 v5.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed