Skip to content

Commit 2a7e62f

Browse files
committed
Let geom_text split along aes colour
1 parent 5076e1e commit 2a7e62f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

R/ggplotly.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ markLegends <-
5353
polygon=c("colour", "fill", "linetype", "size", "group"),
5454
bar=c("colour", "fill"),
5555
step=c("linetype", "size", "colour"),
56-
boxplot=c("x"))
56+
boxplot=c("x"),
57+
text=c("colour"))
5758

5859
markUnique <- as.character(unique(unlist(markLegends)))
5960

R/trace_generation.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ geom2trace <- list(
428428
if (!is.null(params$size)) {
429429
L$textfont$size <- params$size
430430
}
431-
if (!is.null(data$colour)) {
432-
L$textfont$color <- data$colour
431+
if (!is.null(params$colour)) {
432+
L$textfont$color <- params$colour
433433
}
434434
L
435435
},

0 commit comments

Comments
 (0)