I have a plotly.js graph with several subheadings that have an x ββaxis, as in https://plot.ly/javascript/subplots/#stacked-subplots-with-a-shared-x-axis
I'm trying to hover over all the subtasks to immediately display the values ββof all points with the same x value.
I tried to solve this by calling Plotly.Fx.hover on each subtitle, but it seems to take effect only for the last subtitle on which it is called. http://codepen.io/john-soklaski/pen/adQwBa
The code I tried is:
Plotly.Fx.hover('myDiv', {xval: 2, curveNumber: 0}, "xy") Plotly.Fx.hover('myDiv', {xval: 2, curveNumber: 1}, "xy2")
Ideally, the API would be such that I could do this at a time:
Plotly.Fx.hover('myDiv', [{xval: 2, curveNumber: 0, subplot: "xy"}, {xval: 2, curveNumber: 1, subplot: "xy2"}])
Any thoughts on how to make this work?
javascript plotly
John soklaski
source share