Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Create a face with d3.js!

Public visualization

Fork of Create a face with d3.js!

0 stars0🌍 Public
LLavinaThorat
Last edited Oct 3, 2023
Created on Oct 3, 2023

This example builds a smiling yellow face in SVG using D3 v7. The code selects an SVG element and uses D3’s `arc` generator to create a mouth path, while circles and rectangles form the eyes and eyebrows. The eyebrows animate upward and back down via chained `transition().duration()` calls. Dimensions for facial features are defined as constants, and the face is centered using a group transform.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.

Comments

Sign in to join the discussion.

MIT Licensed