Fork of Fork of Let's make a face with D3.js!
✓ Published1🌍 Public
This example shows a smiley face with animated eyebrows, built entirely with D3.js v5 in a React component. The face is rendered on an HTML5 Canvas using the Canvas 2D API, with `ctx.arc` drawing the head and `ctx.fillRect` creating random sprinkles. The code demonstrates fundamental DOM and canvas manipulation, using React’s `useEffect` hook to execute drawing logic once on mount. No data source is used; it relies purely on hardcoded shape positions and random color generation for decoration. The result is a playful static illustration of basic graphics programming.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed