[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 10 h
- PR mergées (30 j)
- 30
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
-
chore P3 plotly-internal size: 3 task
Difficulté 2/5 1-3 heures Accessibilité débutants 77/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
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Theme loads third-party resources on every page (jsdelivr web font, cdnjs Font Awesome) – GDPR Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
nightscout/nocturne#1414 ·
-
bug v2
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
modelcontextprotocol/inspector#2458 · 1 commentaire ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
carbon-design-system/ibm-products#9907 ·