Skip to content

Compare Mode Bar button is for 'x' axis not 'y'axis when all Scatter Chart traces are Horizontal #3619

Closed
@PaulRCooper

Description

@PaulRCooper

The compare mode bar button behaviour is for 'x' axis rather than even when you set all the traces to horizontal (orientation of 'h').

If you set the traces as horizontal the Mode Bar and set the hovermode to 'y' the button is unselected (so is the closest button) even though the expected 'y' hovermode behaviour occurs when hovering.

See example at https://jsbin.com/wibivof. Here I have 3 charts:

  1. The first is a horizontal bar chart showing the correct and expected behaviour in both the chart and the button.

  2. The second chart shows a horizontal scatter chart (all traces are horizontal) with hovermode set to 'y' and you get the correct behaviour on hovering but the button is unselected. If you click on the compare button you get 'x' axis compare behaviour instead. To get 'y' mode behaviour requires a refresh of the page.

  3. The third chart is a copy of the second chart but includes a workaround to force the correct behaviour using the plotly_afterplot event to update the hovermode and the button state.

Possibly relates to issue #778

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions