You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect placement of hoverinfo with shared axes #1468
From discussion on #1461, the placement of the hoverinfo on the axis is incorrect on charts with a shared axis, for example mocks/stacked_coupled_subplots.json:
It seems to be being drawn based on the bottom of the sub-charts y-axis position as opposed to being based on the position of the x-axis itself.
I'm not sure incorrect is the right word here. I think the current behavior could be enhanced, but by no means wrong. Take this very tall graph for example where all subplots are linked to the same x-axis, in this case having the x hover label be displayed on the true x-axis (at the bottom of the graph) would essentially make it invisible for most of the graph.
So adding an attribute e.g. layout.xaxis.showhoverlabeloncommonaxis (or something less verbose 😄 ) would be the way to go here.
I don't think anyone is going to go through the thought process "this graph is super tall so I'd better change how the common axis hover labels get placed"... and anyway who's to say what's "too tall", that's different for each viewer, and depending on the context the plot may be scrolled halfway off screen anyway. So I wouldn't be in favor of making this configurable.
How about we try to detect where the bottom of the screen is, and move the label down to the bottom-most shared axis but then push it back up onto the screen if necessary? Not actually sure how to do that but given all the sites that make something happen to an element when it scrolls on screen I imagine it's possible...
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson
Activity
etpinard commentedon Mar 13, 2017
I'm not sure incorrect is the right word here. I think the current behavior could be enhanced, but by no means wrong. Take this very tall graph for example where all subplots are linked to the same x-axis, in this case having the x hover label be displayed on the true x-axis (at the bottom of the graph) would essentially make it invisible for most of the graph.
So adding an attribute e.g.
layout.xaxis.showhoverlabeloncommonaxis(or something less verbose 😄 ) would be the way to go here.alexcjohnson commentedon Mar 13, 2017
I don't think anyone is going to go through the thought process "this graph is super tall so I'd better change how the common axis hover labels get placed"... and anyway who's to say what's "too tall", that's different for each viewer, and depending on the context the plot may be scrolled halfway off screen anyway. So I wouldn't be in favor of making this configurable.
How about we try to detect where the bottom of the screen is, and move the label down to the bottom-most shared axis but then push it back up onto the screen if necessary? Not actually sure how to do that but given all the sites that make something happen to an element when it scrolls on screen I imagine it's possible...
gvwilson commentedon Jun 10, 2024
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson