Commit 20e6f0eb authored by Dorchies David's avatar Dorchies David
Browse files

feat(overview): disable slideInput by default and plot enhancements

parent dee650b6
Pipeline #22572 passed with stage
in 13 minutes and 14 seconds
......@@ -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,
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())
})
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment