Correct cut numbers selection.

This commit is contained in:
Costa
2021-06-18 09:57:44 +02:00
parent c69cfb05e3
commit 65b29845dc
+6 -2
View File
@@ -114,12 +114,16 @@ server <- function(input, output) {
}) })
output$lowcut<-renderUI({ output$lowcut<-renderUI({
if (!is.null(dades$taula)){ if (!is.null(dades$taula)){
sliderInput("lowcut", "Corte inferior", min=0, max=0.6, step=0.05, value=0) cut.max<-round(max(dades$taula$Volume, na.rm = T), 2)
step<-round(max(dades$taula$Volume, na.rm = T)/20, 2)
sliderInput("lowcut", "Corte inferior", min=0, max=cut.max, step=step, value=0)
} }
}) })
output$upcut<-renderUI({ output$upcut<-renderUI({
if (!is.null(dades$taula)){ if (!is.null(dades$taula)){
sliderInput("upcut", "Corte superior", min=0, max=0.6, step=0.05, value=0.6) cut.max<-round(max(dades$taula$Volume, na.rm = T), 2)
step<-round(max(dades$taula$Volume, na.rm = T)/20, 2)
sliderInput("upcut", "Corte superior", min=0, max=cut.max, step=step, value=cut.max)
} }
}) })
output$goButton<-renderUI({ output$goButton<-renderUI({