Dimming of unselected points by both plotly and crosstalk makes points progressively fade away.
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
When I use crosstalk, selecting a rectangle multiple times causes other points to progressively dim away.
remotes::install_github("plotly/plotly.R")
library(plotly)
shared_data <- highlight_key(mtcars)
p <- ggplot(shared_data)+aes(cyl, mpg)+geom_point()
# Unselected points progressively fade as multiple selections are made
ggplotly(p) |>
highlight(on="plotly_selected",off="plotly_deselect")
I suspect this is some strange interaction between the usual dimming of unselected points by plotly and the dimming of unselected points via the crosstalk selection. A workaround that seems to fix the problem is to disable the usual plotly dimming, so the only dimming of points is done via crosstalk.
# Workaround:
ggplotly(p) |>
style(unselected=list(marker=list(opacity=1))) |>
highlight(on="plotly_selected",off="plotly_deselect")
PS I'm very excited by the possibilties crosstalk offers. I had a wow moment when I realised it worked with GGally::ggpairs.
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
Commencez par l’exemple R reproductible qui utilise highlight_key(), ggplot(), ggplotly() et highlight() avec plotly_selected. Les sélections rectangulaires répétées ne doivent pas assombrir progressivement les points non sélectionnés, et le workaround style(unselected=list(marker=list(opacity=1))) ne devrait plus être nécessaire.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- r
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100