Skip to content

Commit

Permalink
Remove now unnecessary helper in runPlotMaker
Browse files Browse the repository at this point in the history
  • Loading branch information
pchelle committed Nov 23, 2021
1 parent 9448cbf commit 5677189
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions inst/plot-maker/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ server <- function(input, output) {
})
output$xAxisScale <- renderUI({
plotConfiguration <- getPlotConfiguration()
selectInput("xAxisScale2", label = "scale", choices = Scaling, selected = asScale(plotConfiguration$xAxis$scale))
selectInput("xAxisScale2", label = "scale", choices = Scaling, selected = plotConfiguration$xAxis$scale)
})
output$xAxisLimitsMin <- renderUI({
plotConfiguration <- getPlotConfiguration()
Expand Down Expand Up @@ -627,7 +627,7 @@ server <- function(input, output) {
})
output$yAxisScale <- renderUI({
plotConfiguration <- getPlotConfiguration()
selectInput("yAxisScale2", label = "scale", choices = Scaling, selected = asScale(plotConfiguration$yAxis$scale))
selectInput("yAxisScale2", label = "scale", choices = Scaling, selected = plotConfiguration$yAxis$scale)
})
output$yAxisLimitsMin <- renderUI({
plotConfiguration <- getPlotConfiguration()
Expand Down
13 changes: 0 additions & 13 deletions inst/plot-maker/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,6 @@ isIncluded <- function(values, parentValues) {
return(as.logical(min(values %in% parentValues)))
}


#' @title asScale
#' @description translate ggplot2 scale into tlf `Scaling` argument
asScale <- function(scale) {
if (isIncluded(scale, "identity")) {
return(Scaling$lin)
}
if (isIncluded(scale, "log10")) {
return(Scaling$log)
}
return(scale)
}

#' @title tlfInput
#' @description translate shiny input into tlf argument
#' replacing "none", "" and NA by NULL
Expand Down

0 comments on commit 5677189

Please sign in to comment.