Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

198 Include user's card labels when generating the report #336

Merged
merged 12 commits into from
Oct 13, 2023
12 changes: 7 additions & 5 deletions R/barplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,13 @@ srv_g_barplot <- function(id,

### REPORTER
if (with_reporter) {
card_fun <- function(comment) {
card <- teal::TealReportCard$new()
card$set_name("Barplot")
card$append_text("Barplot", "header2")
card$append_fs(filter_panel_api$get_filter_state())
card_fun <- function(comment, label) {
card <- report_card_template(
title = "Barplot",
label = label,
with_filter = TRUE,
filter_panel_api = filter_panel_api
)
card$append_text("Selected Options", "header3")
encodings_list <- list(
"Experiment:",
Expand Down
12 changes: 7 additions & 5 deletions R/boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,13 @@ srv_g_boxplot <- function(id,

### REPORTER
if (with_reporter) {
card_fun <- function(comment) {
card <- teal::TealReportCard$new()
card$set_name("Boxplot")
card$append_text("Boxplot", "header2")
card$append_fs(filter_panel_api$get_filter_state())
card_fun <- function(comment, label) {
card <- report_card_template(
title = "Boxplot",
label = label,
with_filter = TRUE,
filter_panel_api = filter_panel_api
)
card$append_text("Selected Options", "header3")
encodings_list <- list(
"Experiment:",
Expand Down
12 changes: 7 additions & 5 deletions R/forestplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,13 @@ srv_g_forest_tte <- function(id,

### REPORTER
if (with_reporter) {
card_fun <- function(comment) {
card <- teal::TealReportCard$new()
card$set_name("Forest Plot")
card$append_text("Forest Plot", "header2")
card$append_fs(filter_panel_api$get_filter_state())
card_fun <- function(comment, label) {
card <- report_card_template(
title = "Forest Plot",
label = label,
with_filter = TRUE,
filter_panel_api = filter_panel_api
)
card$append_text("Selected Options", "header3")
encodings_list <- list(
"Experiment:",
Expand Down
12 changes: 7 additions & 5 deletions R/km.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,13 @@ srv_g_km <- function(id,

### REPORTER
if (with_reporter) {
card_fun <- function(comment) {
card <- teal::TealReportCard$new()
card$set_name("Kaplan-Meier Plot")
card$append_text("Kaplan-Meier Plot", "header2")
card$append_fs(filter_panel_api$get_filter_state())
card_fun <- function(comment, label) {
card <- report_card_template(
title = "Kaplan-Meier Plot",
label = label,
with_filter = TRUE,
filter_panel_api = filter_panel_api
)
card$append_text("Selected Options", "header3")
encodings_list <- list(
"Experiment:",
Expand Down
12 changes: 7 additions & 5 deletions R/pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,13 @@ srv_g_pca <- function(id,

### REPORTER
if (with_reporter) {
card_fun <- function(comment) {
card <- teal::TealReportCard$new()
card$set_name("PCA")
card$append_text("PCA", "header2")
card$append_fs(filter_panel_api$get_filter_state())
card_fun <- function(comment, label) {
card <- report_card_template(
title = "PCA",
label = label,
with_filter = TRUE,
filter_panel_api = filter_panel_api
)
card$append_text("Selected Options", "header3")
if (input$tab_selected == "PCA") {
encodings_list <- list(
Expand Down
14 changes: 8 additions & 6 deletions R/quality.R
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,14 @@ srv_g_quality <- function(id,

### REPORTER
if (with_reporter) {
card_fun <- function(comment) {
card <- teal::TealReportCard$new()
card$set_name("Quality Control Plot")
card$append_text("Quality Control Plot", "header2")
card$append_text(tools::toTitleCase(input$plot_type), "header3")
card$append_fs(filter_panel_api$get_filter_state())
card_fun <- function(comment, label) {
card <- report_card_template(
title = "Quality Control Plot",
label = label,
description = tools::toTitleCase(input$plot_type),
with_filter = TRUE,
filter_panel_api = filter_panel_api
)
card$append_text("Selected Options", "header3")
encodings_list <- list(
"Experiment:",
Expand Down
12 changes: 7 additions & 5 deletions R/scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,13 @@ srv_g_scatterplot <- function(id,

### REPORTER
if (with_reporter) {
card_fun <- function(comment) {
card <- teal::TealReportCard$new()
card$set_name("Scatter Plot")
card$append_text("Scatter Plot", "header2")
card$append_fs(filter_panel_api$get_filter_state())
card_fun <- function(comment, label) {
card <- report_card_template(
title = "Scatter Plot",
label = label,
with_filter = TRUE,
filter_panel_api = filter_panel_api
)
card$append_text("Selected Options", "header3")
encodings_list <- list(
"Experiment:",
Expand Down
12 changes: 7 additions & 5 deletions R/volcanoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,13 @@ srv_g_volcanoplot <- function(id,

### REPORTER
if (with_reporter) {
card_fun <- function(comment) {
card <- teal::TealReportCard$new()
card$set_name("Volcano Plot")
card$append_text("Volcano Plot", "header2")
card$append_fs(filter_panel_api$get_filter_state())
card_fun <- function(comment, label) {
card <- report_card_template(
title = "Volcano Plot",
label = label,
with_filter = TRUE,
filter_panel_api = filter_panel_api
)
card$append_text("Selected Options", "header3")
encodings_list <- list(
"Experiment:",
Expand Down