From 6ea29ef9e09d638e799a3a195ec7cc1eb886bb02 Mon Sep 17 00:00:00 2001 From: Carson Date: Tue, 2 Nov 2021 12:04:56 -0500 Subject: [PATCH] Follow up to #2063: test discrete-ness of fill after statistics have been calculated --- R/layers2traces.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/layers2traces.R b/R/layers2traces.R index 6a6ad2dd6b..ca260f6835 100644 --- a/R/layers2traces.R +++ b/R/layers2traces.R @@ -368,7 +368,7 @@ to_basic.GeomRasterAnn <- function(data, prestats_data, layout, params, p, ...) #' @export to_basic.GeomTile <- function(data, prestats_data, layout, params, p, ...) { # geom2trace.GeomTile is a heatmap, which requires continuous fill - if (is.discrete(prestats_data$fill %||% NA_character_)) { + if (is.discrete(data$fill_plotlyDomain %||% NA_character_)) { data <- prefix_class(data, "GeomRect") to_basic(data, prestats_data, layout, params, p) } else {