Plot does not show hoverinfo for first data point when default hovermode or set to 'closest'
Personne n'a encore pris cette issue.
- Langage dominant
- R
- Étoiles
- 2.7k
- Forks
- 641
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
As written in the title, the hoverinfo for the first (bottom left) data point when layout.hovermode= 'closest' or kept as default does not appear.
# call library
library(plotly)
# reset fig
fig <- NULL
# add an extra line to check behavior on right hand side of graph
cars_one_extra_line <- rbind(cars,c(25,90))
# plot
fig <- plot_ly(cars_one_extra_line)
fig <- fig %>% add_trace(x = ~speed,
y = ~dist,
color = ~dist,
colors = 'RdBu',
type = 'scatter',
mode = 'markers')
fig <- fig %>% layout(hovermode = "closest")
fig
This is shown in the screenshot below. If the cursor is moved to the point above, the hoverinfo appears.

In an effort to understand the behavior, I also tried other tags. Strangely, the hovermode = 'y' also seems to have a weird behavior. Things to note are the following:
- text is tilted,
- text is sometimes obscured beyond the viewing frame (not shown in this example but does occur in certain cases),
- text is sometimes shown twice but in two places,
- y axis position is not always shown (for points at the top and bottom of the chart)


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.
Piste de recherche
Exécutez la reproduction R fournie avec plot_ly, des marqueurs de dispersion et hovermode défini sur "closest" ou "y" afin de confirmer le comportement de hover manquant et mal formé. Suivez le chemin de rendu du hover utilisé par le package R et sa sortie graphique interactive ; le travail est terminé lorsque le premier point affiche hoverinfo et que les cas de hovermode signalés sont rendus de manière cohérente, sans rognage, duplication ni positions d’axe manquantes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- r
- Domaine
- data-visualization, frontend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100