Skip to main content
100%

Let's make a face ith D3.js!

✓ Published1🌍 Public
AAuliaAmirullah15
Last edited Apr 13, 2023
Created on Apr 12, 2023
Forked from HTML Cars Report

This example builds a smiling face out of basic SVG shapes, then animates its eyebrows with a looping transition. D3 v7 selects the SVG and uses the `arc` generator to draw the mouth as a half-ring path, while circles and rectangles form the eyes and brows. The animation runs for two seconds per eyebrow movement, creating a repeated up-and-down motion. The code demonstrates D3 selections, transitions, and the `arc` API, all rendered directly to SVG.

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