Skip to main content
100%

demo of D3

✓ Published1🌍 Public
Lliu981101
Last edited Dec 24, 2022
Created on Dec 24, 2022
Forked from D3 Starter

This example shows a simple yellow face with two eyes and an open mouth, rendered as SVG shapes and animated with D3 transitions. The code uses D3 v7's `select` and `arc` functions to build the shape, with a circle for the head, two circles for eyes, and an arc path for the mouth. One eye animates vertically up and down using chained `transition()` calls with `attr` updates over 1000ms durations, while the other eye and mouth remain static. The SVG canvas is 800 by 400 pixels, and the drawing is centered via a `g` element transform.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes