plotly / plotly/plotly.js

Should we expose an official version of Fx.hover that works for all subplot types?

Open
#1,963 5 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Hello,

I recently switched my app from using scatter to scattergl and realized that the Fx.hover method does not work correctly for that plot type. This codepen shows that the change to scattergl breaks the hover call. I did not see this listed anywhere as a gl2d limitation so I wanted to get it out there. I also realize that the plan is for Fx to be removed in the future however I was hoping there may be some plan to amend the hover method to work with scattergl.

A quick look through made it seem like one of the sticking points is that the hover method is looking for a "hoveron" field in the trace which is not present for scattergl. It is then set to an empty string and the hover code moves on without looking for any points to execute the hover on.

Thanks!

Contributor guide

Open the contributing guide

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 by reproducing the linked CodePen with scatter and scattergl, then inspect the existing Fx.hover entry point and how it handles the trace's hoveron field. Clarify whether the project wants an official hover API that supports all subplot types, and define completion as consistent hover behavior for scattergl without relying on an undocumented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.