🌍 Public
Viewing a saved revision (read-only)
d5e1a5002c644d688f8ab227d84b515e
Fork of Fork of Create a face with d3.js!
This example builds a smiling face with D3.js on an SVG canvas, starting with a yellow head and then adding eyes, eyebrows, and a mouth. The code uses D3 v7 loaded via UNPKG, with the `select` and `arc` functions from the d3 module. A local module import structure is demonstrated through the ES6 code. The eyebrows are animated using chained `transition().duration()` calls, moving them down and back up over two-second intervals. The numeric attributes for geometry are hard-coded, and the face is centered within a 960-by-500 SVG.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.