Trace is lost with animation, not all ids exist in the legend
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I couldn't find this issue here - copying it accordingly:
This issue arises when I have animated frames and the ids do not exist for all frames (particularly the first one). Here is a reproducible example:
dat = data.frame(f = rep(1:4, each = 10),
x = rep(1:5, 2*4),
y = rep(c(rep(1, 5), rep(2, 5)), 4),
id = rep(rep(LETTERS[1:2], each = 5), 4))
dat = dat[dat$id == "B" | dat$id == "A" & dat$f == 3,]
plot_ly(x = ~ x,
y = ~ y,colors = c("#FF0000","#0000FF")) %>%
add_lines(
data = group_by(dat, id, f),
frame = ~ f,
key = ~ id,
ids = ~ id,
color = ~ id)
Notice in frame 3 that the line at y = 2 disappears. I also get a warning:
Warning message:
In p$x$data[firstFrame] <- p$x$frames[[1]]$data :
number of items to replace is not a multiple of replacement length
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
Beginne damit, das reproduzierbare R-Beispiel im issue auszuführen, und untersuche, wie animierte Frames, ids und der erste Frame zusammengesetzt werden. Erledigt ist es, wenn die Linie bei y = 2 in Frame 3 sichtbar bleibt und die Warnung zur Länge der Ersetzung nicht mehr erscheint.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100