Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Face D3 Starter

Public visualization

Face D3 Starter

0 stars0🌍 Public
FF Javier López Herrera
Last edited Jun 5, 2022
Created on Jun 5, 2022
Forked from D3 Starter

This example creates a simple smiley face using D3 version 7 and SVG primitives. A yellow circle serves as the face, with two small black circles and an arc for the eyes and mouth, all positioned and scaled to the browser viewport. The `onmousemove` event handler tracks the cursor, and the code uses `d3.select`, `d3.arc`, and SVG attribute chaining to translate and reposition the face’s features, making the eyes and mouth subtly follow the mouse movement in real time.

AI-generated description

A demonstration of how to start using D3 version 6.

Comments

Sign in to join the discussion.

MIT Licensed