How to display y value of mouse pointer?

Hi all,
how do I make it so that the y-value of the current mouse pointer position is always displayed? I basically donโ€™t care where it is displayed.
Thank you very much

Hi, could you try fig.update_layout(hovermode='y') or fig.update_layout(hovermode='y unified'). You will get something as below:


Hi, Iโ€™ve used it before in my code, it shows me y-values of curve. But I want to show y-value of mouse pointer too.
And it is impossible to set hovermode to โ€˜x yโ€™. Only to x or to y. Both x and y cannot be used.

fig3.update_layout(hovermode = 'x unified', spikedistance = -1)

Maybe this helps?