Skip to main content
100%

Fork of Let's make a face with D3.js!

✓ Published0🌍 Public
SSravaniPosina
Last edited Feb 17, 2023
Created on Feb 17, 2023

This example demonstrates fundamental DOM manipulation with D3.js by rendering a yellow smiley face with animated eyebrows. The face is drawn using SVG shapes—circles for the eyes, rectangles for the eyebrows, and a path generated with `d3.arc()` for the mouth—all positioned within a group centered on an SVG canvas. The eyebrows move via chained `transition()` calls with specified durations, shifting their vertical position to create a raising effect. The code imports `select` and `arc` directly from the d3 module and uses attribute chaining to build the visualization.

AI-generated description

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

MIT Licensed

Similar vizzes