[BUG]: `shape.pattern` for bar trace causes color and pattern to be applied to wrong traces in unified hover tooltip
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 70/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- javascript
- Domaine
- data-visualization, frontend
Piste de recherche
Commencez par la reproduction dans CodePen et la configuration de Plotly.newPlot utilisant hovermode: 'x unified', marker.color et marker.pattern. Suivez la manière dont l’infobulle de survol unifiée choisit l’échantillon de couleur de chaque barre, puis vérifiez que le survol de A et de B affiche la couleur et le motif correspondants pour chaque barre.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Description
When shape.pattern is provided as an array to a bar trace, the first bar's pattern (and color!) are incorrectly applied to both bars in the hovermode: 'x unified' hover tooltip.
Expected: Swatch in hover tooltip should match color and pattern of bar which is being hovered over.
Actual: Swatch in hover tooltip matches color and pattern of first bar in trace, even when hovering over the second bar.
When shape.pattern is not provided, each hover tooltip correctly shows the color of the bar that's being hovered over.
Screenshots/Video
Steps to reproduce
Codepen: https://codepen.io/emilykl-code/pen/azJvXPy
Code:
var fig = {
"data": [
{
"marker": {
"color": ["red", "purple"],
"pattern": {"shape": ["/", ""]}
},
"textposition": "outside",
"x": ["A", "B"],
"y": [1, 2],
"type": "bar"
}
],
"layout": {
"hovermode": "x unified",
"title": {
"text": "Hover over 'B' to see wrong color and pattern"
}}
};
Plotly.newPlot("div1", fig.data, fig.layout);
Notes
First reported in plotly.py by https://github.com/plotly/plotly.py/issues/4882
- Langage dominant
- JavaScript
- Étoiles
- 18.3k
- Forks
- 2k
- Merge moyen
- 2 j 12 h
- PR mergées (30 j)
- 28
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de plotly/plotly.js
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
chore P1 plotly-internal size: 1 task
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
-
chore P3 plotly-internal size: 1 task
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
bug infrastructure P2
Difficulté 1/5 Moins d'une heure Accessibilité débutants 65/100
Toutes les issues de plotly/plotly.js
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
bevyengine/bevy-website#2595 ·