diff --git a/R/mod_instant_risk_overview.R b/R/mod_instant_risk_overview.R index b082ac019fef3cb61478959fe9a1cae3afeec086..9086aee9739a0cef6b637c906040b57172b699ca 100644 --- a/R/mod_instant_risk_overview.R +++ b/R/mod_instant_risk_overview.R @@ -7,7 +7,7 @@ #' @noRd #' #' @importFrom shiny NS tagList -#' @importFrom shinyjs useShinyjs +#' @importFrom shinyjs useShinyjs disabled mod_instant_risk_overview_ui <- function(id){ ns <- NS(id) choices <- seq(length(rvgest::rulesets$rules)) @@ -42,11 +42,13 @@ mod_instant_risk_overview_ui <- function(id){ fluidRow( lapply(seq.int(nrow(rvgest::lakes)), function(i) { column(width = 3, - sliderInput(ns(paste0("V", i)), - label = paste(rvgest::lakes$name[i], "lake (hm3)"), - value = round(getObjectiveStorage()[rvgest::lakes$name[i]]), - min = rvgest::lakes$min[i], - max = rvgest::lakes$max[i])) + disabled( + sliderInput(ns(paste0("V", i)), + label = paste(rvgest::lakes$name[i], "lake (hm3)"), + value = round(getObjectiveStorage()[rvgest::lakes$name[i]]), + min = rvgest::lakes$min[i], + max = rvgest::lakes$max[i])) + ) }) ), # tableOutput(ns("table")) @@ -98,7 +100,8 @@ mod_instant_risk_overview_server <- function(id, con, SGL_RT_storage) { output$plot <- renderPlot( ggplot(df(), aes(x = reorder(objective, prob), y = prob)) + geom_col(aes(fill = level)) + - scale_y_continuous(labels = scales::percent_format(accuracy = 1)) + + scale_y_continuous(name = "Failure risk", labels = scales::percent_format(accuracy = 1)) + + scale_x_discrete(name = "Objectives downstream the reservoirs") + coord_flip()) }) }