Fork of need some fruit - click interactions
✓ Published1🌍 Public
CCalvin.
Last edited Mar 22, 2022
Created on Mar 22, 2022
Forked from need some fruit - General Update Patterns
Five apples and a lemon are rendered as color-coded circles in an SVG bowl, with each fruit selectable by click. The selected fruit gains a black outline. The code uses D3 v5’s `scaleOrdinal` for color and radius, and joins data to circles with `selectAll`, `enter`, and `merge`. It also demonstrates transitions on `attr` for radius and position, plus `on('click')` handlers to update a selected fruit’s ID and re-render. Data updates add, remove, and change fruit types over timed intervals.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed