Skip to main content
100%

Fork of D3 Starter

✓ Published0🌍 Public
CChris Beaumont
Last edited Oct 11, 2023
Created on Oct 11, 2023
Forked from D3 Starter

This example uses D3 v7 to render a simple yellow smiley face on an SVG canvas. The code builds the face from basic shapes: a circle for the head, two circles for eyes, rectangles for eyebrows, and a path created with the `arc()` function for the mouth. An animation sequence, driven by chained `transition()` calls with a 2000-millisecond duration, moves the eyebrows down and back up. The underlying data is positional, defined by hard-coded constants like `eyeSpacing` and `eyeRadius`, directly set as SVG attributes through D3's selection and append methods.

AI-generated description

A demonstration of how to start using D3 version 7.

MIT Licensed

Similar vizzes