Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Mmhdpessanha
Last edited Sep 17, 2019
Created on Sep 17, 2019

This example demonstrates building a smiling face with D3.js, where the eyebrows animate by moving up and down. The face is constructed using SVG shapes, including circles for the head and eyes, rectangles for the eyebrows, and a path for the mouth created with the `arc` generator. The code utilizes `transition().duration(2000)` to animate the eyebrows, shifting their containing group’s transform attribute. The visualization is rendered in an SVG canvas with a 960x500 viewport, using D3 v5.

AI-generated description

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

MIT Licensed

Similar vizzes