From 459ebc4816d1375f27073dabf797f85cdd75c088 Mon Sep 17 00:00:00 2001 From: paulbochtler <65470117+datapumpernickel@users.noreply.github.com> Date: Mon, 18 Nov 2024 20:54:34 +0100 Subject: [PATCH] fix error that did not allow missing rows with labels = T --- R/gt-bar-html.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/gt-bar-html.R b/R/gt-bar-html.R index 21e44b0b..421493f1 100644 --- a/R/gt-bar-html.R +++ b/R/gt-bar-html.R @@ -115,7 +115,7 @@ gt_plt_bar_pct <- function( # create label string to print out // add % sign if requested label <- glue::glue("{round(label_values, decimals)}%") - if (x < (label_cutoff * max_x)) { + if (!is.na(x) && x < (label_cutoff * max_x)) { css_styles <- paste0( "background:", fill,";",