Implement per-subplot hovermode
See original GitHub issueIt 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?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
I guess
hovermode
actually controls two pieces of behavior:x/y
: multiple,closest
: one)x
: x,y
: y,closest
: both)If we wanted this to be a per-trace attribute, we’d have to split those two apart, as the former isn’t about the behavior of a single trace at all. But it strikes me as potentially confusing to have each trace behave differently in this regard.
We have discussed possible per-subplot control over hovermode, though we have no concrete plans to implement it. For example this plot might want
closest
in the main subplot,x
on top, andy
on the right:Sure @etpinard that sounds more appropriate with the discussion focusing on subplots.