Skip to main content
100%

Create a face with d3.js!

✓ Published99🌍 Public
PPenguin-jpg
Last edited Sep 13, 2023
Created on Sep 13, 2023

This visualization assembles a smiling cartoon face from basic SVG shapes—a yellow circle for the head, two eyes, eyebrows, and an arc-based mouth—centered within a 960×500 canvas. The d3.v7 code imports `select` and `arc` from the D3 library, uses `transition()` to animate the eyebrow group’s vertical position over two seconds, and relies on an SVG `path` with computed coordinates for the mouth. Rendered entirely in the browser with D3’s DOM manipulation, it highlights animated attribute updates without external data.

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