File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -309,6 +309,11 @@ plotly_build <- function(l = last_plot()) {
309
309
idx <- names(d ) %in% get_boxed() & sapply(d , length ) == 1
310
310
if (any(idx )) x $ data [[i ]][idx ] <- lapply(d [idx ], I )
311
311
}
312
+ # ugh, annotations _must_ be an _array_ of object(s)...
313
+ a <- x $ layout $ annotations
314
+ if (! is.null(a ) && ! is.null(names(a ))) {
315
+ x $ layout $ annotations <- list (x $ layout $ annotations )
316
+ }
312
317
# search for keyword args in traces and place them at the top level
313
318
kwargs <- lapply(x $ data , function (z ) z [get_kwargs()])
314
319
if (length(kwargs ) == 1 ) kwargs <- c(kwargs , kwargs )
Original file line number Diff line number Diff line change @@ -48,11 +48,6 @@ plotly_POST <- function(x) {
48
48
" plot from api"
49
49
}
50
50
if (is.null(kwargs $ fileopt )) kwargs $ fileopt <- " new"
51
- # ugh, annotations _must_ be an _array_ of object(s)...
52
- a <- kwargs $ layout $ annotations
53
- if (! is.null(a ) && ! is.null(names(a ))) {
54
- kwargs $ layout $ annotations <- list (kwargs $ layout $ annotations )
55
- }
56
51
# construct body of message to plotly server
57
52
bod <- list (
58
53
un = verify(" username" ),
You can’t perform that action at this time.
0 commit comments