Skip to main content
100%

D3 (Data Driven Documents)

✓ Published1🌍 Public
Iidlevalor
Last edited Jul 25, 2021
Created on Jul 24, 2021
Forked from Hello VizHub

This example uses the D3.js library to draw a stylized smiley face entirely with SVG primitives. The code sets up a canvas, then builds facial features—a yellow circle, two eyes, eyebrows, a nose, and a mouth—using `circle`, `rect`, and `path` elements. Key D3 APIs include the `select` function to target the SVG root and the `arc` generator to construct the curved paths for the nose and mouth. A `.transition().duration(2000)` animation moves the right eyebrow downward over two seconds, while the left eyebrow remains static. All rendering is handled through SVG.

AI-generated description
MIT Licensed

Similar vizzes