Skip to main content
100%

Fork of Create a face with d3.js!

✓ Published0🌍 Public
Ssolution365
Last edited Sep 25, 2023
Created on Sep 25, 2023

This example shows a yellow smiley face drawn in SVG using D3.js, with its eyebrows animating up and down in a repeating cycle. The face is assembled from circles, rectangles, and a path created with D3’s `arc()` helper, all positioned within a centered `<g>` group. The code uses D3 v7, loaded via UNPKG, and demonstrates `import` of `select` and `arc` from the D3 module. Eyebrow motion is achieved with chained `transition().duration()` calls that alternate the group’s transform attribute.

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