Skip to main content
Public

Share visualization

Loading preview…

Device1

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

Device1

0
MMorris Muriithi
Last edited Aug 4, 2024
Created on Aug 4, 2024

A yellow smiley face with animated eyebrows is rendered in an SVG using D3.js v5. The face includes two eyes, a curved mouth, and rectangular eyebrows, all drawn with basic SVG shapes and manipulated via D3 selections. The eyebrows transition vertically in a repeating two-second cycle using chained `transition().duration()` calls. The code imports `select` and `arc` from D3, using `arc` to generate the mouth path, and applies transforms to position elements relative to the SVG center.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

Comments

Sign in to join the discussion.

MIT Licensed