Commit 12fd4bbc authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.10.41 NEW: added Theme argument in .DiagramGR function #25

parent 9fb12276
Package: airGRteaching Package: airGRteaching
Type: Package Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included) Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.10.40 Version: 0.2.10.41
Date: 2020-05-25 Date: 2020-05-25
Authors@R: c( Authors@R: c(
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"), person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
......
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
### 0.2.10.40 Release Notes (2020-05-25) ### 0.2.10.41 Release Notes (2020-05-25)
#### New features #### New features
- the <code>ShinyGR()</code> interface, can now run on monthly time series, using the GR2M model. So, now 'airGRteaching' depends on the version of 'airGR' >= 1.4.3.87) - the <code>ShinyGR()</code> interface, can now run on monthly time series, using the GR2M model. So, now 'airGRteaching' depends on the version of 'airGR' >= 1.4.3.87)
- in the <code>ShinyGR()</code> interface, there is a new tab panel that shows a summary sheets of basin if the name of the dataset contains the code station (8 characters : 1 letter and 7 numbers) of the Banque Hydro French database (so it is available only for the dataset of this database) - in the <code>ShinyGR()</code> interface, there is a new tab panel that shows a summary sheets of basin if the name of the dataset contains the code station (8 characters : 1 letter and 7 numbers) of the Banque Hydro French database (so it is available only for the dataset of this database)
- the <code>.DiagramGR()</code> gains a <code>Theme</code> argument in order to manage the colors whithout the use of a global variable
#### User-visible changes #### User-visible changes
......
...@@ -107,7 +107,7 @@ if (getRversion() >= "2.15.1") { ...@@ -107,7 +107,7 @@ if (getRversion() >= "2.15.1") {
## function to plot the gr models diagrams (only GR4J and GR5J) ## function to plot the gr models diagrams (only GR4J and GR5J)
## ================================================================================= ## =================================================================================
.DiagramGR <- function(OutputsModel, Param, SimPer, EventDate, HydroModel, CemaNeige) { .DiagramGR <- function(OutputsModel, Param, SimPer, EventDate, HydroModel, CemaNeige, Theme = NULL) {
# -------------------------------------------------------------------------------- # --------------------------------------------------------------------------------
...@@ -168,13 +168,15 @@ if (getRversion() >= "2.15.1") { ...@@ -168,13 +168,15 @@ if (getRversion() >= "2.15.1") {
par(col.axis = par("fg"), cex.axis = 1.3, cex.lab = 1.3, cex = 0.7, mgp = mgp) par(col.axis = par("fg"), cex.axis = 1.3, cex.lab = 1.3, cex = 0.7, mgp = mgp)
if (.GlobalEnv$.ShinyGR.args$theme == "Cyborg") { if (!is.null(Theme)) {
col_mod_bg <- rgb(255-245, 255-245, 255-245, maxColorValue = 255) if (Theme == "Cyborg") {
col_mod_bd <- rgb(255-231, 255-231, 255-231, maxColorValue = 255) col_mod_bg <- rgb(255-245, 255-245, 255-245, maxColorValue = 255)
} col_mod_bd <- rgb(255-231, 255-231, 255-231, maxColorValue = 255)
if (.GlobalEnv$.ShinyGR.args$theme == "Flatly") { }
col_mod_bg <- "#ECF0F1" if (Theme == "Flatly") {
col_mod_bd <- "#ECF0F1" col_mod_bg <- "#ECF0F1"
col_mod_bd <- "#ECF0F1"
}
} }
# Pas de temps # Pas de temps
......
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