FR: Add support for plotly_sunburstclick and plotly_treemapclick in highlight()
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- r
- Bereich
- data-visualization
Rechercherichtung
Beginne damit nachzuverfolgen, wie highlight() die Ereignisnamen plotly_click und plotly_doubleclick behandelt, und vergleiche dieses Verhalten anschließend mit dem bereitgestellten sunburst- und treemap-Beispiel. Überprüfe, ob die crosstalk-Ansichten auf plotly_sunburstclick und plotly_treemapclick reagieren, während das bestehende highlight-Verhalten erhalten bleibt; das Issue nennt außerdem plotly_unhover als verwandte off-event-Anfrage.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus plotly/plotly.R
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
-
save_image Error Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
Alle Issues in plotly/plotly.R
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
easystats/performance#950 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
briandconnelly/airnow#9 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
OHDSI/CohortConstructor#774 ·