Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
AAkarsh Jain
Last edited Jun 14, 2020
Created on Jun 14, 2020

A yellow smiley face built with D3.js demonstrates basic DOM manipulation and animation. The code uses `d3.select` to target the SVG, appends circles and rectangles for the eyes and eyebrows, and constructs the mouth with the `d3.arc` generator. A chained `transition().duration(2000)` moves the eyebrow group up and down repeatedly, creating a bouncing effect. All shapes are drawn with SVG attributes like `cx`, `r`, and `x` without any external data source.

AI-generated description

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

MIT Licensed

Similar vizzes