Hover to select
✓ Published0🌍 Public
This example demonstrates a data visualization of fruits as colored circles, highlighting how to use hover interactions to select a fruit. The visualization is built with React, using D3’s `scaleOrdinal` for color and radius mapping, and SVG animation. When the user hovers over a circle, the `setSelectedFruit` function updates the selected fruit, adding a black stroke; mouseout clears the selection. The code also shows adding, removing, and updating fruit data with transitioned animations.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed