Skip to main content
100%

Play around with d3.js

✓ Published0🌍 Public
IIan
Last edited Mar 8, 2023
Created on Mar 8, 2023
Forked from HTML Starter

This example uses D3 v5 and React to build an animated, SVG-based face with eyes that shift horizontally in a looping transition. The code leverages D3 selections, SVG attribute binding via `attr`, and chained `transition().duration()` calls to alternate the eye group’s transform between two positions. The face is centered using a translated `<g>` element, with fixed constants for eye spacing, radius, and brow dimensions. Rendering relies purely on SVG shapes—circles and rectangles—without external data, focusing on animation timing and nested group transformations.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes