Skip to content

Commit

Permalink
Merge pull request #26 from koolerjaebee/master
Browse files Browse the repository at this point in the history
chores: change dropdownbutton default value render logic
  • Loading branch information
jinseob2kim authored Apr 3, 2024
2 parents fb52eb3 + 652f210 commit 6ad40df
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 28 deletions.
13 changes: 5 additions & 8 deletions R/bar.R
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,8 @@ barServer <- function(id, data, data_label, data_varStruct = NULL, nfactor.limit
add <- c("jitter", "mean_se")
}

if (is.null(input$pvalfont)) {
pval.font.size <- c(4, 4, 0.4)
pval.coord <- c(0.5, 1)
} else {
pval.font.size <- c(input$pvalfont, input$p_pvalfont, input$p_pvalfont / 10)
pval.coord <- c(input$pvalx, input$pvaly)
}

pval.font.size <- c(input$pvalfont, input$p_pvalfont, input$p_pvalfont / 10)
pval.coord <- c(input$pvalx, input$pvaly)
pval.name <- input$pvalue
ppval.name <- input$p_pvalue
spval.name <- input$s_pvalue
Expand Down Expand Up @@ -616,6 +610,9 @@ barServer <- function(id, data, data_label, data_varStruct = NULL, nfactor.limit
)
})

# Dropdown button default option
outputOptions(x = output, name = "option_kaplan", suspendWhenHidden = FALSE)

return(barInput)
}
)
Expand Down
12 changes: 5 additions & 7 deletions R/box.R
Original file line number Diff line number Diff line change
Expand Up @@ -475,13 +475,8 @@ boxServer <- function(id, data, data_label, data_varStruct = NULL, nfactor.limit
if (input$fillcolor) {
fillcolor <- "gray"
}
if (is.null(input$pvalfont)) {
pval.font.size <- c(4, 4, 0.4)
pval.coord <- c(0.5, 1)
} else {
pval.font.size <- c(input$pvalfont, input$p_pvalfont, input$p_pvalfont / 10)
pval.coord <- c(input$pvalx, input$pvaly)
}
pval.font.size <- c(input$pvalfont, input$p_pvalfont, input$p_pvalfont / 10)
pval.coord <- c(input$pvalx, input$pvaly)
pval.name <- input$pvalue
ppval.name <- input$p_pvalue
spval.name <- input$s_pvalue
Expand Down Expand Up @@ -607,6 +602,9 @@ boxServer <- function(id, data, data_label, data_varStruct = NULL, nfactor.limit
)
})

# Dropdown button default option
outputOptions(x = output, name = "option_kaplan", suspendWhenHidden = FALSE)

return(boxInput)
}
)
Expand Down
20 changes: 7 additions & 13 deletions R/line.R
Original file line number Diff line number Diff line change
Expand Up @@ -398,19 +398,10 @@ lineServer <- function(id, data, data_label, data_varStruct = NULL, nfactor.limi
linetype <- input$strata
}
}

if (is.null(input$pvalfont)) {
line.position.dodge <- 0
line.size <- 0.5
line.point.size <- 0.5
pval.font.size <- 4
} else {
line.position.dodge <- input$positiondodge
line.size <- input$size
line.point.size <- input$pointsize
pval.font.size <- input$pvalfont
}

line.position.dodge <- input$positiondodge
line.size <- input$size
line.point.size <- input$pointsize
pval.font.size <- input$pvalfont

res.plot <- ggpubr::ggline(data, input$x_line, input$y_line,
color = color, add = add, add.params = add.params, conf.int = input$lineci,
Expand Down Expand Up @@ -514,6 +505,9 @@ lineServer <- function(id, data, data_label, data_varStruct = NULL, nfactor.limi
)
})

# Dropdown button default
outputOptions(x = output, name = "option_kaplan", suspendWhenHidden = FALSE)

return(lineInput)
}
)
Expand Down

0 comments on commit 6ad40df

Please sign in to comment.