question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement per-subplot hovermode

See original GitHub issue

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.

ycat-xlin {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) xcat-ylin {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:open
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexcjohnsoncommented, Jan 21, 2018

I guess hovermode actually controls two pieces of behavior:

  • Can you get multiple labels, or at most only one? (x/y: multiple, closest: one)
  • Which coordinates are used to determine distance to data points? (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, and y on the right: screen shot 2018-01-21 at 1 29 29 pm

0reactions
paulsputercommented, Jan 30, 2018

Sure @etpinard that sounds more appropriate with the discussion focusing on subplots.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotly - how to display y values when hovering on two subplots ...
With the two stock prices, you have set a threshold value for each. Your objective is the same threshold value, so please modify...
Read more >
Unified hovermode with sublots - Plotly Python
Hi, I was wondering if is it possible to have the new unified hovermode working in the case we have subplots from plotly.subplots...
Read more >
plotly.subplots: helper function for laying out multi-plot figures
Applies to all columns (use 'specs' subplot-dependents spacing) ... Per subplot specifications of subplot type, row/column spanning, and spacing.
Read more >
Hover Text and Formatting in Python-Plotly - GeeksforGeeks
If layout.hovermode='x' , a single hover label appears per trace, for points at the same x value as the cursor.
Read more >
13 Arranging views
The most basic use of subplot() to merge multiple plotly objects into a single ... Figure 13.2 shows one time series for each...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found