Vertical or/and horizontal line that is always shown in any hovermode

Hi Everyone,
I am looking for a working examples .
I have seen a lot of stuff reg but could not find the working examples.

Vertical or/and horizontal line that is always shown in any hovermode

Thank You

Here’s one:

Its working if we have single x-axis and single y-axis.
But in my scenario we are having multiple y-axis.

I added on x-axis showspikes: true, spikemode: ‘toaxis+across+marker’, spikesnap: ‘cursor’

Can You pls advise where its wrong.

Thank You

Can you share a reproducible code snippet to help us debug? Thanks!

Hi etienne,
my code is similar to the fiddler
Even the multiple Y axes code I have done using the fiddler given above.

can we add spike to it .
I added “xaxis”: { showspikes: true, spikemode: ‘toaxis’, spikesnap: ‘cursor+data’ }.
But it did not work.

Thank You.

You were using an old version of plotly.js that didn’t include spikes.

Looks like works ok.

Yes the spikes is working on the latest fiddler.
But can we show the data on hover on all the legends . And then add spikes.
the spike will be as reference at the particular point to see all the legends hover.
i.e a line (spike) + to see all the legends data.

or just add the line and show all the legends hover data.

Thank You

I’m not sure what you mean by “hover on all the legends”. Could you clarify? Thank you!

Hi Etiennne,
I have hovered on the 2nd Trend from Top.
So the spike its shows on the Trend( red color) all the rest of the trends are hovering the data.

Its a combination of spike +hover on the rest of Trends.

Ha, I see you’re using that Fx.hover trick.

Spikes don’t work so well with Fx.hover at the moment unfortunately:

Thank You etienne.
But it happens only when we have multiple y-axis.

Thank You