Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Mmikeferri
Last edited Dec 31, 2021
Created on Dec 31, 2021

A playful SVG face built with D3.js animates when the page loads, flipping vertically and raising its eyebrows before settling back into place. The example demonstrates core D3 modules, using `d3.select` and `d3.arc` to construct the circular head, eyes, eyebrows, and mouth from primitive shapes. It chains `transition` and `attr` calls to animate the group containing the face and the eyebrow elements over two-second durations. The code imports `select` and `arc` directly from the D3 v7 library, which is loaded via UNPKG, and relies on SVG coordinates and CSS styling for presentation.

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.
MIT Licensed

Similar vizzes