plotly / plotly/plotly.js

[BUG]: last period label sometimes not drawn when using negative ticklabelindex

Ouverte
#7,875 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

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

Description

Here is an example of the last ticklabel not being drawn. The figure's ticklabelindex is set to -1:

Plotly 3.6.0 (missing last label)
Image

Plotly 3.5.1 (all labels visible)
Image

This is a regression from #7735. In version 3.5.1 ticklabelindex was ignored because no minor ticks were drawn. In version 3.6.0 ticklabelindex is not ignored and so for this figure, the label is expected to be drawn to the left of each major tick (ticklabelindex -1). However, there is no tick to the right of the last period and so that period is not labeled.

Before ticklabelindex, period labels were only ever drawn to the right of a major tick. There is logic in plotly to add a helper tick before the first period, making sure it will be labeled. For negative ticklabelindex, the same logic is required for the period at the end of the axis range.

Codepen: https://codepen.io/toffi-fee/pen/MYJEWLY

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

Reproduisez le label manquant avec le CodePen associé, en comparant le comportement de 3.5.1 et 3.6.0. Suivez la gestion de ticklabelindex et la logique helper-tick existante pour la première période, puis assurez-vous que le cas équivalent en fin de plage étiquette la dernière période lorsque l’index est négatif.

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é
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
65/100

Recevez les nouvelles issues par e-mail

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