Skip to content

Commit 8498923

Browse files
committed
have error_x/error_y color inherit from marker.color
1 parent f8b8427 commit 8498923

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/plotly_build.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,13 @@ map_color <- function(traces, title = "", na.color = "transparent") {
508508
# to make consistent, in "filled polygons", color -> fillcolor, stroke -> line.color
509509
for (i in seq_along(color)) {
510510
if (!is.null(traces[[i]]$marker$color)) {
511-
traces[[i]]$marker$line$color <- traces[[i]]$marker$line$color %||% "transparent"
511+
traces[[i]]$marker$line$color <- traces[[i]]$marker$line$color %||% "transparent"
512+
for (j in c("error_x", "error_y")) {
513+
if (!is.null(traces[[i]][[j]])) {
514+
traces[[i]][[j]][["color"]] <- traces[[i]][[j]][["color"]] %||%
515+
traces[[i]]$marker[["color"]]
516+
}
517+
}
512518
}
513519
}
514520

0 commit comments

Comments
 (0)