FR: Add support for plotly_sunburstclick and plotly_treemapclick in highlight()
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- r
- Domaine
- data-visualization
Piste de recherche
Commencez par retracer la façon dont highlight() gère les noms d’événements plotly_click et plotly_doubleclick, puis comparez ce comportement avec l’exemple sunburst et treemap fourni. Vérifiez que les vues crosstalk réagissent à plotly_sunburstclick et plotly_treemapclick, tout en conservant le comportement existant de highlight ; l’issue identifie également plotly_unhover comme une demande connexe d’off-event.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
As sunburst/treemap charts have their own click-events: plotly_sunburstclick / plotly_treemapclick it would be nice to support them in highlight.
The following (plotly_click) doesn't work as expected:
library(plotly)
library(crosstalk)
sunburstDF <- structure(list(labels = structure(c(1L, 3L, 4L, 2L, 7L, 6L, 5L,
7L, 6L, 5L, 7L, 6L, 5L), levels = c("Total", "mixed", "private",
"public", "commercial", "recreation", "residential"), class = "factor"),
values = c(1658, 353, 1120, 185, 108, 143, 102, 300, 320,
500, 37, 58, 90), parents = c(NA, "Total", "Total", "Total",
"Total - private", "Total - private", "Total - private",
"Total - public", "Total - public", "Total - public", "Total - mixed",
"Total - mixed", "Total - mixed"), ids = c("Total", "Total - private",
"Total - public", "Total - mixed", "Total - private - residential",
"Total - private - recreation", "Total - private - commercial",
"Total - public - residential", "Total - public - recreation",
"Total - public - commercial", "Total - mixed - residential",
"Total - mixed - recreation", "Total - mixed - commercial"
)), row.names = c(NA, -13L), class = "data.frame")
d <- highlight_key(sunburstDF, ~ids)
fig <- plot_ly(data = d, ids = ~ids, labels= ~labels, parents = ~parents, values= ~values, type='sunburst', branchvalues = 'total')
fig1 <- fig2 <- highlight(fig, on = "plotly_click", off = "plotly_doubleclick", dynamic = FALSE)
crosstalk::bscols(fig1, fig2)
Related: allow plotly_unhover as an off event: https://github.com/plotly/plotly.R/issues/1864
- Langage dominant
- R
- Étoiles
- 2.7k
- Forks
- 641
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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.R
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
-
Data gets dropped in add_trace and consequently points have the wrong color if NA is present Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
-
save_image Error Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
Toutes les issues de plotly/plotly.R
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
easystats/performance#950 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
briandconnelly/airnow#9 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Copy cohorts to keep old cohorts Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
OHDSI/CohortConstructor#774 ·