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
IIrfan Qureshi
Last edited Oct 3, 2023
Created on Oct 3, 2023

This example creates a cheerful cartoon face using D3.js, with animated eyebrows that move up and down over a two-second cycle. The face is drawn with SVG shapes, including circles for the eyes, rectangles for the eyebrows, and a path generated using the `arc()` API for the mouth. The code demonstrates importing `select` and `arc` from the D3 v7 library and chains `transition().duration()` calls to animate the eyebrow position. All elements are centered within an SVG canvas 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