Commit 5782bb8f authored by unknown's avatar unknown
Browse files

v0.1.6.13 it is now possible to register the last simulation and draw it on...

v0.1.6.13 it is now possible to register the last simulation and draw it on Flow time series of ShinyGR #4668
parent 86700f5c
Package: airGRteaching
Type: Package
Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Interface)
Version: 0.1.6.12
Version: 0.1.6.13
Date: 2017-09-28
Authors@R: c(person("Olivier", "Delaigue", role = c("aut", "cre"), email = "airGR@irstea.fr"), person("Laurent", "Coron", role = c("aut")), person("Pierre", "Brigode", role = c("aut")), person("Guillaume", "Thirel", role = c("ctb")))
Depends: airGR (>= 1.0.9.43)
......
......@@ -286,9 +286,15 @@ shinyServer(function(input, output, session) {
## Plot flow time series
output$dyPlotTS <- renderDygraph({
if (length(.GlobalEnv$.ShinyGR.hist) == 2 & input$ShowOldQsim == "Yes") {
QsimOld <- getRES()$SIMold[[1]]$Qsim
} else {
QsimOld <- NULL
}
# Qold <- ifelse(format(OutputsModel2$DatesR, "%Y%m%d") > format(input$Event, "%Y%m%d"), NA, QsimOld[IndPlot])
op <- getPlotPar()$par
dg1 <- dyplot(getRES()$SIM, RangeSelector = FALSE, LegendShow = "auto",
col.Q = c(op$fg, "orangered"), col.Precip = "#428BCA")
dg1 <- dyplot(getRES()$SIM, Qsup = QsimOld, Qsup.name = "Qold", RangeSelector = FALSE, LegendShow = "auto",
col.Q = c(op$fg, "orangered", "grey"), col.Precip = "#428BCA")
dg1 <- dyOptions(dg1, axisLineColor = op$fg, axisLabelColor = op$fg, retainDateWindow = FALSE)
dg1 <- dyLegend(dg1, show = "follow", width = 325)
})
......@@ -347,8 +353,8 @@ shinyServer(function(input, output, session) {
## Plot model diagram precipitation
output$dyPlotMDp <- renderDygraph({
barChartPrecip <- scan(file = system.file("plugins/barChartPrecip.js", package = "airGRteaching"),
what = "character", quiet = TRUE)
# barChartPrecip <- scan(file = system.file("plugins/barChartPrecip.js", package = "airGRteaching"),
# what = "character", quiet = TRUE)
data <- data.frame(DatesR = getRES()$SIM$OutputsModel$DatesR,
precip. = getRES()$SIM$OutputsModel$Precip)
data.xts <- xts(data[, -1L, drop = FALSE], order.by = data$DatesR)
......
......@@ -162,7 +162,7 @@ navbarPage(title = div("airGRteaching",
plotOutput("stPlotMD", width = "100%", height = "665px"))),
column(width = 02,
tableOutput("Criteria"),
conditionalPanel(condition = "input.PlotType == 'Model diagram'",
conditionalPanel(condition = "input.PlotType == 'Flow time series' || input.PlotType == 'Model diagram'",
radioButtons("ShowOldQsim", label = "Show old Qsim",
choices = c("No", "Yes"), inline = TRUE)),
downloadButton("DownloadTab" , label = "Download sim. as csv",
......
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