plotly / plotly/plotly.js

[BUG]: Return of #3619 - Issue with hovermode default logic for horizontal traces.

Ouverte
#7,671 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

bug P2
Langage dominant
JavaScript
Étoiles
18.3k
Forks
2k
Merge moyen
2 j 12 h
PR mergées (30 j)
28

Description

I reported back in 2019 issue #3619 which was fixed in #3646 (v1.45.3) We have been using v1.47.4 until recently when we moved to v2.35.3 (latest at the time). I had to add v1hovermode to the mode bar to get the to hover/comparison buttons back but discovered that the issue with hovermode behaviour with horizontal scatter based charts has returned and also seems to affect bar charts too now:

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.

I have grabbed my example page from #3619 and updated it by adding in v1hovermode and some more scatter chart variants. The first chart is still the stacked bar chart that now doesn't work anymore, the last is still the scatter chart with my workaround. The other three show the incorrect behaviour.

Plotly.js Bug 3619 returns.html

I tested it with various versions here are my results:

v1.58.4 (last v1.x.x) - Pass
v2.0.0 - Fail
v2.35.3 - Fail
v3.3.0 - Fail

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par la reproduction jointe "Plotly.js Bug 3619 returns.html" et comparez son comportement entre les versions répertoriées. Lisez issue #3619 et le correctif dans pull request #3646 pour comprendre l’ancienne logique de hovermode. Le travail est terminé lorsque les graphiques de dispersion et à barres horizontaux sélectionnent le hovermode et les boutons de mode-bar corrects, y compris hovermode 'y'.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
data-visualization
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.