Commit f8350886 authored by unknown's avatar unknown
Browse files

v0.1.5.10 bug fixed in dygraph legends when precip = 0

parent 332390b8
Package: airGRteaching
Type: Package
Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Interface)
Version: 0.1.5.9
Version: 0.1.5.10
Date: 2017-09-06
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.8.0)
......
......@@ -43,7 +43,7 @@ dyplot.default <- function(x, col.Precip = "royalblue", col.Q = c("black", "oran
dg <- dyAxis(dygraph = dg, name = "y", label = ylab[1L],
valueRange = range(data.xts[, grep("^Q", colnames(data.xts))], na.rm = TRUE) * c(0.01, 1.59))
dg <- dyAxis(dygraph = dg, name = "y2", label = ylab[2L], independentTicks = FALSE,
valueRange = rev(range(data.xts[, "Precip"], na.rm = TRUE) * c(0.01, 2.99)))
valueRange = c(max(data.xts[, "Precip"], na.rm = TRUE), -1e-3) * c(2.99, 0.01))
dg <- dySeries(dygraph = dg, name = "Qobs", drawPoints = TRUE)
dg <- dySeries(dygraph = dg, name = tail(grep("^Q", colnames(data.xts), value = TRUE), 1),
axis = 'y' , color = col.Q[seq_along(grep("^Q", colnames(data.xts)))])
......
......@@ -310,7 +310,7 @@ shinyServer(function(input, output, session) {
dg4 <- dygraph(data.xts, group = "mod_diag", ylab = "precip. [mm/d]")
dg4 <- dyOptions(dg4, colors = "#428BCA", drawXAxis = FALSE, plotter = barChartPrecip, retainDateWindow = FALSE)
dg4 <- dyAxis(dg4, name = "y", valueRange = rev(range(data.xts[, "precip."], na.rm = TRUE)))
dg4 <- dyAxis(dg4, name = "y", valueRange = c(max(data.xts[, "precip."], na.rm = TRUE), -1e-3))
dg4 <- dyEvent(dg4, input$Event, color = "orangered")
dg4 <- dyLegend(dg4, show = "onmouseover", width = 225)
dg4 <- dyCrosshair(dg4, direction = "vertical")
......
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