Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3-1: Making a face

Public visualization

Fork of D3-1: Making a face

0 stars0🌍 Public
HHari Prashath
Last edited Sep 21, 2023
Created on Sep 21, 2023

This example uses D3 v7 to construct a simple cartoon face from SVG primitives. A yellow circle forms the head, two blue circles become the eyes, a path drawn with the `d3.arc` function creates the mouth, and two rectangles serve as eyebrows. The eyebrows animate repeatedly via chained `transition().duration(2000).attr()` calls, moving them up and down over time. The code demonstrates core D3 operations like `select`, `append`, and `attr` to build and manipulate SVG elements directly.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed