Skip to content
Discussion options

You must be logged in to vote

The issue is that setHover can be set by multiple points at the same time, but can only store one value to show which one is being hovered.

To fix this you need to track all the hover states for each of the points.

In this example, I turned your points into a HoverPoint component so that each point can track its hover state separately.

https://codesandbox.io/s/funny-sunset-3pftwq?file=/src/App.js

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ida-fe
Comment options

@mwmwmw
Comment options

@ida-fe
Comment options

@mwmwmw
Comment options

@ida-fe
Comment options

Answer selected by ida-fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants