Skip to content

Commit 0cbb078

Browse files
authored
Pass fill value to legend key icons (#3781)
* Fill legend key icons. Closes #3455.
1 parent 8fcdd44 commit 0cbb078

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/legend-draw.r

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ draw_key_path <- function(data, params, size) {
137137
segmentsGrob(0.1, 0.5, 0.9, 0.5,
138138
gp = gpar(
139139
col = alpha(data$colour %||% data$fill %||% "black", data$alpha),
140+
fill = alpha(params$arrow.fill %||% data$colour
141+
%||% data$fill %||% "black", data$alpha),
140142
lwd = (data$size %||% 0.5) * .pt,
141143
lty = data$linetype %||% 1,
142144
lineend = "butt"

0 commit comments

Comments
 (0)