Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3 Starter

Public visualization

Fork of D3 Starter

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed