Plotly.js: Showing spikelines on Fx.hover and Fx.loneHover?

Created on 3 Apr 2018  路  7Comments  路  Source: plotly/plotly.js

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?

bug

All 7 comments

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.

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.

Referencing https://github.com/plotly/plotly.js/issues/1848 and https://github.com/plotly/plotly.js/issues/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 :upside_down_face: )

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.

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

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?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danielsamuels picture danielsamuels  路  3Comments

etpinard picture etpinard  路  3Comments

pynklu picture pynklu  路  3Comments

maxwell8888 picture maxwell8888  路  3Comments

bryaan picture bryaan  路  3Comments