Skip to main content
Public

Share visualization

Loading preview…

Let's make a happy 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

Let's make a happy face

0
RRYAN
Last edited Jul 14, 2023
Created on Jul 13, 2023

This example draws a yellow circle face with two black eyes, rectangular eyebrows, and an arc-shaped smile using SVG. The eyebrows animate upward and back down via D3 transitions over two seconds. The code sets element positions with absolute `x`, `y`, `cx`, `cy` coordinates and uses D3’s `arc()` generator to define the mouth path. The D3 v7 library handles SVG construction and the two-stage `transition().duration()` animation.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed