Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

graph2.js!

Public visualization

Viewing a saved revision (read-only)

670a79734fd447359a7ed53dbae49b52

graph2.js!

0 stars2🌍 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.