Skip to content

Showing spikelines on Fx.hover and Fx.loneHover? #2517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lnunno opened this issue Apr 3, 2018 · 8 comments
Closed

Showing spikelines on Fx.hover and Fx.loneHover? #2517

lnunno opened this issue Apr 3, 2018 · 8 comments
Labels
bug something broken

Comments

@lnunno
Copy link

lnunno commented Apr 3, 2018

I've made a codepen as an example. I would like the behavior to be that the effect of Fx.hover is the same as hovering over a single point manually, the spikelines are shown.

I would also like this behavior for scattergl plots, I had posted an issue in react-plotly.js, but maybe here is a more appropriate place, I have not seen of a way to resolve data's x, y pixel values without a mouse event, but the only solution in this plotly forum thread was to have a mouse event is it possible to do this another way?

@lnunno lnunno changed the title Showing spikelines on Fx.hover? Showing spikelines on Fx.hover and Fx.loneHover? Apr 3, 2018
@lnunno
Copy link
Author

lnunno commented Apr 3, 2018

This is my latest codepen that tries to use synchronized hover lines with a datetime x axis and getting Fx.hover warnings that hover failed. It seems to expect the values to be numeric or fails to retrieve them given the datetime string, I've also tried time in milliseconds since the epoch but with no success.

@alexcjohnson alexcjohnson added the bug something broken label Apr 4, 2018
@alexcjohnson
Copy link
Collaborator

I would like the behavior to be that the effect of Fx.hover is the same as hovering over a single point manually, the spikelines are shown.

Yes, I agree that that should be the behavior. Seems like a bug that this isn't what happens.

It seems to expect the values to be numeric or fails to retrieve them given the datetime string, I've also tried time in milliseconds since the epoch but with no success.

I'll have to look at this one in more detail, but in principle it should work using the date string. milliseconds are problematic and discouraged.

@etpinard
Copy link
Contributor

etpinard commented Apr 4, 2018

Referencing #1848 and #1963

Personally, I don't think we should add more features to Fx.hover. The declarative hover analog to selectedpoints (I think we settled on hoveredpoints) will effectively replace Fx.hover (and Fx.loneHover - not sure how that one got into our docs 🙃 )

@lnunno
Copy link
Author

lnunno commented Apr 4, 2018

I'm primarily using scattergl, so it may be an acceptable workaround for me to know how to retrieve the x, y points without an event handle so that I can use Fx.loneHover as an alternative, unless hoveredpoints is soon to be released.

@bfeist
Copy link

bfeist commented Sep 12, 2018

Hi there. Any word on this? I'd love for my triggered hover labels to look the same as mouse rollover.

@slowkow
Copy link

slowkow commented May 13, 2019

With Plotly 1.47.4, I tried to trigger a hover with Plotly.Fx.hover() and it didn't work because I'm using scattergl instead of scatter.

Could I please ask if you might be able to share an example with a workaround for this issue?

@Qbiteee
Copy link

Qbiteee commented Apr 21, 2020

Any update on that or an alternative to Plotly.Fx.hover() ?

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

7 participants