Highlighting doesn't work after filtering on the same variable as the plot coloring
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
From @micahdh:
The problem occurs when you select a species from the dropdown and then lasso one graph -- the other graph doesn't change. When you only filter by other_factor (or don't filter at all) highlighting occurs as normal.
For what it's worth this issue occurs in my own script when I filter on any column -- regardless of if it's used for coloring or anything else. I only noticed that it matters which column you filter on while I was reproducing the problem.
Thank you for an otherwise amazing package!
require(crosstalk)
require(plotly)
iris$other_factor <- sample(x = c("a", "b", "c"), size = nrow(iris), replace = T)
iris_shared <- SharedData$new(iris)
bscols(widths = c(6, 6, 6, 6),
filter_select("species", "species", iris_shared, ~Species, multiple = T),
filter_select("otherfactor", "other factor", iris_shared, ~other_factor, multiple = T),
plot_ly(data = iris_shared, x = ~Sepal.Length, y = ~Sepal.Width, color = ~Species) %>%
add_markers() %>%
layout(dragmode = "lasso") %>%
highlight(on = "plotly_selected", off = "plotly_deselect"),
plot_ly(data = iris_shared, x = ~Petal.Length, y = ~Petal.Width, color = ~Species) %>%
add_markers() %>%
layout(dragmode = "lasso") %>%
highlight(on = "plotly_selected", off = "plotly_deselect")
)
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Führe die bereitgestellte R-Reproduktion mit iris, SharedData, filter_select(), plot_ly() und highlight() aus. Vergleiche das Verhalten der Lasso-Auswahl nach dem Filtern nach species oder other_factor; abgeschlossen ist es, wenn das Auswählen von Punkten in einem Diagramm das andere Diagramm aktualisiert, unabhängig davon, nach welcher Spalte gefiltert wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100