Skip to main content
100%

Fork of Create a face with d3.js!

✓ Published0🌍 Public
MMatias Conde
Last edited Oct 3, 2023
Created on Oct 3, 2023

This example builds a cartoon face out of basic SVG shapes—a yellow circle for the head, two eyes, rectangular eyebrows, and an arc-based mouth—all drawn with D3 selections. The layout is computed from the SVG dimensions and centered with a transform. It demonstrates importing `select` and `arc` from the d3 module and uses chained `transition().duration(2000)` calls to animate the eyebrows moving up and down. The page loads D3 v7 from UNPKG and renders to a static SVG element.

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