Skip to content

correct example for ggplot_decorator#28

Merged
kpagacz merged 5 commits intomainfrom
JGQO-527-ggplot-decorator-fix
Mar 26, 2026
Merged

correct example for ggplot_decorator#28
kpagacz merged 5 commits intomainfrom
JGQO-527-ggplot-decorator-fix

Conversation

@aqlina
Copy link
Copy Markdown
Collaborator

@aqlina aqlina commented Mar 17, 2026

Check if the example for ggplot_decorator works correctly, make sure that the teal.modules.general version is at least 0.6.0.
Change Title or Footnote via UI, chekc if the plot appies changes correctly

devtools::load_all()




data <- teal.data::teal_data()
data <- within(data, {
  require(nestcolor)
  ADSL <- teal.data::rADSL
})
join_keys(data) <- default_cdisc_join_keys[names(data)]

# teal.modules.general >= 0.6.0
app <- init(
  data = data,
  modules = modules(
    teal.modules.general::tm_g_scatterplot(
      label = "Scatterplot Choices",
      x = teal.transform::data_extract_spec(
        dataname = "ADSL",
        select = teal.transform::select_spec(
          label = "Select variable:",
          choices = teal.transform::variable_choices(data[["ADSL"]], c("AGE", "BMRKR1", "BMRKR2")),
          selected = "AGE",
          multiple = FALSE,
          fixed = FALSE
        )
      ),
      y = data_extract_spec(
        dataname = "ADSL",
        select = teal.transform::select_spec(
          label = "Select variable:",
          choices = teal.transform::variable_choices(data[["ADSL"]], c("AGE", "BMRKR1", "BMRKR2")),
          selected = "BMRKR1",
          multiple = FALSE,
          fixed = FALSE
        )
      ),
      decorators = list(
        plot = ggplot_decorator(
          output_name = "plot", render_ui = c("title", "footnote", "font_size_axis_title")
        )
      )
    )
  )
)


if (interactive()) {
  shinyApp(app$ui, app$server)
}
  

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 17, 2026

badge

Code Coverage Summary

Filename                                     Stmts    Miss  Cover    Missing
-----------------------------------------  -------  ------  -------  ---------
R/BlockConditions.R                             14      14  0.00%    23-54
R/create_rel_risk_transformator.R               42      42  0.00%    41-87
R/forest_plot_decorator.R                      164     164  0.00%    97-373
R/ggplot_decorator.R                           244     244  0.00%    105-375
R/merge_levels_transformator.R                 146     146  0.00%    11-240
R/or_filtering_transformator_view_model.R       27      27  0.00%    26-64
R/or_filtering_transformator.R                 254     254  0.00%    69-369
R/patchwork_plot_decorator.R                    46      46  0.00%    18-68
R/r_access_utilities.R                          46      46  0.00%    32-152
R/title_footer_decorator.R                     130     130  0.00%    103-241
R/watermark_decorator.R                         61      61  0.00%    23-87
TOTAL                                         1174    1174  0.00%

Diff against main

Filename                             Stmts    Miss  Cover
---------------------------------  -------  ------  --------
R/create_rel_risk_transformator.R       -1      -1  +100.00%
TOTAL                                   -1      -1  +100.00%

Results for commit: 28807bf

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@kpagacz kpagacz self-requested a review March 26, 2026 11:35
@kpagacz kpagacz merged commit 993ced9 into main Mar 26, 2026
25 checks passed
@kpagacz kpagacz deleted the JGQO-527-ggplot-decorator-fix branch March 26, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants