-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add support for multiple subplots to fx.hover() #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@john-soklaski thanks for this very impressive PR. 🍻 I think you've got every detail right. I did found some unexpected behavior when To see what I'm referring to, paste the following in the test dashboard: var gd = Tabs.fresh();
Plotly.plot(gd, [{
x: [1,2,3]
}, {
x: [2.1,2],
xaxis: 'x2'
}, {
x: [3,2,1],
xaxis: 'x3'
}], {
xaxis: {
domain: [0,0.3],
},
xaxis2: {
domain: [0.35, 0.65]
},
xaxis3: {
domain: [0.7, 1]
},
hovermode: 'y'
});
gd.on('plotly_hover', function(d) {
Plotly.Fx.hover(gd, { yvals: d.yvals[0] }, ['xy', 'x2y', 'x3y']);
}); Berfore merging this we'll need to add some tests in |
Thanks for reviewing! I think the issue in your example may be due to a typo. I ran your example, and it only hovered on the middle points of the graph no matter where I placed my mouse. But, after debugging a bit, I found plotly.js/src/plots/cartesian/graph_interact.js Lines 404 to 416 in dd15479
It wasn't using the provided | | I added some unit tests for both stacked subplots with a shared x-axis and a shared y-axis. I'd also like to test that the hover labels appear in each of their corresponding subplots. The positioning of these was an issue earlier on and it's something I could see regressing. What do you think is the most stable way to test this? I took your example from above and added it as a mock so I could use it in a unit test. |
Yes. Find the artefact tab on your latest commit's CircleCI page: Download the new baseline and commit it in |
Thanks! Didn't realize I had to login in order to access the artifacts. I added the baseline and it all seems to be working now. |
An early candidate for PR of year. Thank you very much. |
Add support for multiple subplots to fx.hover()
Does this hover work for plotly.py on subplots of different types as in the issue 2114 |
Thanks both @etpinard @john-soklaski, I had been looking for this feature for months |
No description provided.