Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Heart D3

Public visualization

Heart D3

0 stars0🌍 Public
Fferneyhoughedward@gmail.com
Last edited Mar 21, 2023
Created on Mar 21, 2023

A smiley face built from SVG circles and rectangles in red on a blank canvas demonstrates basic DOM manipulation and animation with D3.js. The eyebrows shift upward over one second, then return to their original position over eight seconds using chained transitions. The code constructs elements by appending to groups, calculates positions from window dimensions, and leverages D3’s `select`, `append`, `attr`, and `transition().duration()` APIs, with a custom triangle symbol added via `d3.symbol()`.

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