Skip to content

Commit 124bce8

Browse files
committed
always reduce an array of strings to a string when hoveron fills, addresses #1233
1 parent a0772f1 commit 124bce8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/utils.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ verify_attr <- function(proposed, schema) {
480480
}
481481

482482
# plotly.js should really handle this logic
483-
if (identical(proposed[["hoveron"]], "fill")) {
484-
proposed[["text"]] <- retain(proposed[["text"]], uniq)
483+
if (isTRUE(grepl("fill", proposed[["hoveron"]]))) {
484+
proposed[["text"]] <- paste(proposed[["text"]], collapse = "\n")
485485
}
486486

487487
# ensure data_arrays of length 1 are boxed up by to_JSON()

0 commit comments

Comments
 (0)