Skip to content

Commit f570427

Browse files
committed
Add valid attribute fill for box mode
1 parent 7a0176d commit f570427

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

R/utils.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,14 @@ verify_attr_names <- function(p) {
460460
for (tr in seq_along(p$x$data)) {
461461
thisTrace <- p$x$data[[tr]]
462462
attrSpec <- Schema$traces[[thisTrace$type %||% "scatter"]]$attributes
463+
attrSpec_names <- c(names(attrSpec), "key", "set", "frame", "transforms", "_isNestedKey", "_isSimpleKey", "_isGraticule", "_bbox", "fill")
464+
if(!is.null(thisTrace$type) && thisTrace$type == "box"){
465+
attrSpec_names <- c(attrSpec_names, "box")
466+
}
463467
# make sure attribute names are valid
464468
attrs_name_check(
465469
names(thisTrace),
466-
c(names(attrSpec), "key", "set", "frame", "transforms", "_isNestedKey", "_isSimpleKey", "_isGraticule", "_bbox"),
470+
attrSpec_names,
467471
thisTrace$type
468472
)
469473
}

0 commit comments

Comments
 (0)