-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implement per-subplot hovermode #2274
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
Comments
Is this using the default When you use horizontal bar traces, we turn compare into |
Perfect, thank you, yes Would that be a useful feature here or is it perhaps too much of an edge case? |
Yea there looked to be a fair bit of logic in there, that makes sense. Certainly per-subplot is the way forward. In my offline fork I've added such functionality though it's a bit hacky as I've added a If you're happy with the addition of a |
The There's nothing ordered about the subplots so we could make a data structure like: subplots: {
xy: {bgcolor: 'red', hovermode: 'closest'},
xy2: {bgcolor: 'green', hovermode: 'x'},
x2y: {bgcolor: 'blue', hovermode: 'y'}
} Alternatively we could make it an array, which would be a little easier to square with our validation system: subplots: [
{id:'xy', bgcolor: 'red', hovermode: 'closest'},
{id: 'xy2', bgcolor: 'green', hovermode: 'x'},
{id: 'x2y', bgcolor: 'blue', hovermode: 'y'}
] That said, we do have variable-name attribute containers ( Before you do much work on this though, I'd like to get @etpinard 's opinion on the API, and he's out for the next week. |
Ah yes, first way is how I have it currently implemented from the API perspective and then it copies over to the _ attribute internally. Anyway yes sure look forward to picking this back up when @etpinard returns. |
Sure @etpinard that sounds more appropriate with the discussion focusing on subplots. |
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 |
It appears that when the cartesian axes are flipped (i.e change x to y, and y to x) in both layout and data the resulting chart whilst looking correct has a different UX, namely the hoverinfo.
{yaxis.type:'category'}
{xaxis.type:'linear'}
As expected moving the mouse from left to right displays the label cursors and values.
(unfortunatley the screen capture doesn't capture the cursor, but it is moving)

{yaxis.type:'linear'}
{xaxis.type:'category'}
Moving the mouse from bottom to top does not change the the hoverinfo. Only the hoverinfo for the last element in the data array is displayed. In addition the black cursor for hoverinfo would display the y axis and the blue cursor for hoverinfo would display the x axis.
Perhaps hoverinfo flaglist should interpret order of occurrence to determine which to move, or is there a more appropriate place to handle this?
The text was updated successfully, but these errors were encountered: