Skip to main content
100%

graph2.js!

✓ Published2🌍 Public
Ccyanea1
Last edited Sep 26, 2019
Created on Sep 26, 2019

This example uses D3.js (v5) to draw an animated smiley face in SVG. It shows a yellow circle with two eyes and a mouth, whose eyebrows move up and down via chained `transition()` calls. The code constructs the face using `select`, `append`, and `attr`, and generates the mouth path with the `arc` API. The animation runs on page load with a 2-second duration per eyebrow movement.

AI-generated description

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

MIT Licensed

Similar vizzes