Open NatiG100 opened 5 months ago
I had the same issue, so I went to look through the source code.
It seems like this is why that behavior exists: https://github.com/plouc/nivo/blob/master/packages/geo/src/Choropleth.js#L89-L102
Idk if was intentionally written like this, but the handleMouse* event handlers' default behavior is toggling the tooltip. The event handler props passed to
Should be a pretty simple to fix in the source code. You'd just have to destructure the custom handleMouse* events from the props. If its defined, use it as the event handler, otherwise use the default.
Describe/explain the bug
onMouseEnter
andonMouseLeave
don't work on @nivo/geo(both events are not fired).Steps to reproduce the behavior:
ResponsiveChoropleth
chartonMouseEnter
and/oronMouseLeave
propertiesonMouseEnter
andonMouseLeave
are never firedExpected behavior
onMouseEnter
should be fired every time the cursor moves to a new area;onMouseLeave
is fired every time the cursor leaves a area.Desktop (please complete the following information):