How to code to get all the stacked datapoint on mouse hovering of X axis shared charts in python plotly


#1

I have X-axis shared stacked data in HTML formats which plots three different Y-axis data. The plotting is very perfect. When i place the mouse in single point i am able to see the data value only in the currently active section (Eg section 1,2,3 now the mouse is in section 3 then i am getting the value of section 3 only it is not showing 1&2 value).

Need your support what should be the code change to get the datapoint value of all the plots when hovering the mouse in any place of the layout. Please help.

This was raised very long back, For more details have a look at this forum as well
[https://stackoverflow.com/questions/47512989/python-plotly-how-to-show-all-the-stacked-y-axis-data-value-while-mouse-hovering?rq=1](http://Detailed Issue and Expected Result Link)

I have given a current and expected output in the image there in the link.


#2

Any solution recommendation here please.


#3

Hi @mbmarx

Unfortunately it doesn’t look like this feature exist yet but is listed as an open issue in the plotly.js repo https://github.com/plotly/plotly.js/issues/2114 Also, note there is a workaround if you’re willing to combine python and javascript https://plot.ly/python/hover-events/

Like others suggest in the community threads, you can use a vertical line (spike line) across the stacked subplots.