layout.shapes.legendgroup is unexpectedly non-functional
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
layout.shapes.legendgroup is non-functional although included in the official reference (https://plotly.com/r/reference/layout/shapes/)
In the below reprex, I have set all objects to the same legendgroup. I would expect them all to disappear when clicking on the legend but this does not happen.
library(plotly)
x <- seq(-2 * pi, 2 * pi, length.out = 1000)
df <- data.frame(x, y1 = sin(x), y2 = cos(x))
fig <-
plot_ly(df, x = ~x) %>%
add_lines(y = ~y1, name = "A", legendgroup = "B") %>%
add_lines(y = ~y2, name = "B", legendgroup = "B")
fig %>%
plotly::layout(shapes =
list(
list(type = "rect",
fillcolor = "blue", line = list(color = "blue"), opacity = 0.3,
x0 = -1, x1 = 1, xref = "x",
y0 = -0.5, y1 = 0.5, yref = "y", legendgroup = "B")))
Example adapted from https://plotly.com/r/dropdowns/
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
Beginnen Sie damit, das bereitgestellte R reprex auszuführen und das Verhalten von legendgroup der Form mit den beiden Linientraces zu vergleichen. Verwenden Sie die Referenz layout.shapes als erwartetes Verhalten; abgeschlossen ist es, wenn das Klicken auf den gemeinsamen Legendeneintrag die Form zusammen mit den gruppierten Traces aus- und einblendet.
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
- 45/100