plotly / plotly/react-plotly.js

OnUnhover being called when it shouldn't

Open
#230 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
138
Avg merge
3d 2h
Merged PRs (30d)
4

Description

I'm not happy with the builtin tooltip for the polar chart, so I'm attempting to make my own, however I'm having issues with it hiding as soon as it should show, and form what I can tell this is because it's running OnUnhover on every redraw (while the cursor is anywhere near the chart)

I've attempted to set up a simple example here
https://codepen.io/tim-logan/pen/qBqOeMZ?editors=1010

Line 72/73 can be flipped in/out with comments to see the result either in console or directly on the plot.

I may just be doing something wrong, but it looks like a bug to me :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodePen reproduction, especially lines 72/73, and trace when the polar chart redraw triggers OnUnhover while the cursor remains near the chart. Done means the custom tooltip remains visible during redraws and OnUnhover runs only when the pointer actually leaves the relevant chart element.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.