Hello guys!
Here in example a code with a multi subplots graph. If you use compare data everything it’s ok but if you use closest data it seems not works properly. http://codepen.io/Narghast/pen/pypRxG
I want to report also that in case of subplots hover and “overlaying” options there are some abnormalities in the print of the hover labels, sometimes they overlap. This happen if you use Plotly.Fx.hover() otherwise the rendering of the labels appear correctly without overlap. I don’t know how to reproduce this problem, but i think that the function for plotting the labels in the case of “compare data” is different from Pltoly.Fx.hover().
There are something wrong in the code? I’m the only one with this problem?
graph.on('plotly_hover', function (eventdata){
if(graph.layout.hovermode === 'x') {
/* do as before */
}
else if(graph.layout.hovermode === 'closest') {
/* use call signature of https://plot.ly/javascript/hover-events/#triggering-hover-events */
}
});
Thanks man. Quite interesting. I was looking at something along this line but different, Two graphs one Hover. What I had in mind was two different graphs with different hovers, say a bar graph on the axis below and a line graph above. The closest I ever got was two subpots but each with a different hover. See also https://github.com/plotly/plotly.js/issues/2114