From f570427286a542bc1900595ed83f03e6d716d541 Mon Sep 17 00:00:00 2001 From: "Oliver.Gray" Date: Wed, 18 Jun 2025 12:50:20 +0100 Subject: [PATCH] Add valid attribute fill for box mode --- R/utils.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index b558e12b03..79cbdf5ba1 100644 --- a/R/utils.R +++ b/R/utils.R @@ -460,10 +460,14 @@ verify_attr_names <- function(p) { for (tr in seq_along(p$x$data)) { thisTrace <- p$x$data[[tr]] attrSpec <- Schema$traces[[thisTrace$type %||% "scatter"]]$attributes + attrSpec_names <- c(names(attrSpec), "key", "set", "frame", "transforms", "_isNestedKey", "_isSimpleKey", "_isGraticule", "_bbox", "fill") + if(!is.null(thisTrace$type) && thisTrace$type == "box"){ + attrSpec_names <- c(attrSpec_names, "box") + } # make sure attribute names are valid attrs_name_check( names(thisTrace), - c(names(attrSpec), "key", "set", "frame", "transforms", "_isNestedKey", "_isSimpleKey", "_isGraticule", "_bbox"), + attrSpec_names, thisTrace$type ) }