Skip to content

Commit f87e571

Browse files
committed
Make it possible to set attributes of autogenerated marker.colorbar
1 parent 9400d1b commit f87e571

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/plotly_build.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ map_color <- function(traces, title = "", na.color = "transparent") {
413413
ncol = 2
414414
)
415415
colorObj <- list(
416-
colorbar = list(title = as.character(title), ticklen = 2),
416+
colorbar = Reduce(modify_list, lapply(traces, function(x) x$marker[["colorbar"]])) %||%
417+
list(title = as.character(title), ticklen = 2),
417418
cmin = rng[1],
418419
cmax = rng[2],
419420
colorscale = colorScale,

0 commit comments

Comments
 (0)