Skip to content

gt_plt_bar_stack() does not render the heading html #139

@Deflagration

Description

@Deflagration

From the gt_plt_bar_stack() vignette:

library(gt)
library(dplyr)
library(gtExtras)

ex_df <- dplyr::tibble(
  x = c("Example 1","Example 1",
        "Example 1","Example 2","Example 2","Example 2",
        "Example 3","Example 3","Example 3","Example 4","Example 4",
        "Example 4"),
  measure = c("Measure 1","Measure 2",
              "Measure 3","Measure 1","Measure 2","Measure 3",
              "Measure 1","Measure 2","Measure 3","Measure 1","Measure 2",
              "Measure 3"),
  data = c(30, 20, 50, 30, 30, 40, 30, 40, 30, 30, 50, 20)
)


tab_df <- ex_df %>%
  group_by(x) %>%
  summarise(list_data = list(data))

tab_df

ex_tab <- tab_df %>%
  gt() %>%
  gtExtras::gt_plt_bar_stack(column = list_data)

ex_tab

Description

Heading renders Rstudio and in Quarto dashboards as html raw.

Expected result

The heading should be a stylized gt() table with a beautiful header.

Session info

R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] gtExtras_0.5.0.9005 dplyr_1.1.4 gt_0.11.1

loaded via a namespace (and not attached):
[1] gtable_0.3.5 compiler_4.4.1 rematch2_2.1.2
[4] tidyselect_1.2.1 xml2_1.3.6 systemfonts_1.1.0
[7] scales_1.3.0 textshaping_0.4.0 fastmap_1.2.0
[10] ggplot2_3.5.1 R6_2.5.1 paletteer_1.6.0
[13] labeling_0.4.3 generics_0.1.3 knitr_1.48
[16] tibble_3.2.1 munsell_0.5.1 svglite_2.1.3
[19] pillar_1.9.0 rlang_1.1.4 utf8_1.2.4
[22] xfun_0.48 sass_0.4.9 cli_3.6.3
[25] withr_3.0.1 magrittr_2.0.3 digest_0.6.37
[28] grid_4.4.1 rstudioapi_0.17.0 fontawesome_0.5.2
[31] lifecycle_1.0.4 vctrs_0.6.5 glue_1.8.0
[34] farver_2.1.2 ragg_1.3.3 fansi_1.0.6
[37] colorspace_2.1-1 tools_4.4.1 pkgconfig_2.0.3
[40] htmltools_0.5.8.9000

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions