Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruit - Hover to Select

Public visualization

Bowl of fruit - Hover to Select

0 stars0🌍 Public
MMelina
Last edited Jun 15, 2020
Created on Jun 15, 2020

Five fruits (initially all apples) sit in a row, and hovering over a circle highlights it with a black outline while the mouse is over it. The visualization demonstrates the D3 general update pattern, using `transition().duration(1000)` to animate the radius and x-position of each fruit. Over time, fruits are removed and a lemon appears, changing its color via a d3 `scaleOrdinal` color scale. The example relies on SVG circles and mouseover/mouseout events to trigger the selection state.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed