Skip to main content
100%

Hover to select

✓ Published0🌍 Public
Eevapavlinek
Last edited Apr 7, 2020
Created on Apr 7, 2020
Forked from Click to select

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 description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes