hovertemplate doesn't work for points in boxplots
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
Using hovertemplate on a boxplot breaks the tooltips for data points, it simply doesn't appear at all:

# Using hoverinfo (works)
plot_ly() %>% add_trace(y = 1:10, type = "box", hoverinfo = "y", boxpoints = "all", pointpos = 0)
# Using hovertemplate (doesn't work)
plot_ly() %>% add_trace(y = 1:10, type = "box", hovertemplate = "%{y}", boxpoints = "all", pointpos = 0)
When inspecting the hovertemplate graph using my browser's dev tools I found that this appears in the console when I move the mouse over a data point:
test2.html:1820 Uncaught TypeError: t.replace is not a function
at Object.l.hovertemplateString (test2.html:1820)
at SVGGElement.<anonymous> (test2.html:1820)
at test2.html:1820
at ut (test2.html:1820)
at Array.W.each (test2.html:1820)
at A (test2.html:1820)
at test2.html:1820
at test2.html:1820
at l (test2.html:1820)
at Object.r.throttle (test2.html:1820)
hovertemplate works as expected for other graph types, like e.g.:
plot_ly() %>% add_trace(y = 1:10, type = "bar", hovertemplate = "%{y}")
plotly 4.9.0
R 3.4.4
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
Reproduisez les deux exemples R avec un boxplot en utilisant boxpoints et hovertemplate, puis comparez-les avec l’exemple de barres fonctionnel. Commencez par l’appel à hovertemplateString affiché dans l’erreur du navigateur et suivez le chemin de survol des points du boxplot ; c’est terminé lorsque hovertemplate est rendu pour les points de données du boxplot sans l’erreur t.replace.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, r
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100