diff --git a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R index a6687a6ee..69c038070 100644 --- a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R +++ b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R @@ -61,18 +61,24 @@ lxTranslate <- function(x, color = "NE", pisava = TRUE, pikaklicaj = FALSE) { x <- gsub(obarvajX, obarvajX_1, x, fixed=TRUE) } if (pisava == TRUE) { - val <- strsplit(x, "\\\\newline ")[[1]] + val <- strsplit(x, "\\\\newline ", fixed = T)[[1]] # val <- val[!c(seq_along(val) %% 2 == 0)] # Gledamo tretji odst <- val[4:length(val)] # Po drugem odstavku zmanjšamo pisavo na 9 - xsmall <- paste0("\\\\begin{footnotesize}", stringr::str_c(odst, collapse = "\\\\smallskip "), "\\\\end{footnotesize}") + xsmall <- paste0("\\\\newline \\\\begin{footnotesize}", stringr::str_c(odst, collapse = "\\\\smallskip "), "\\\\end{footnotesize}") - x <- paste0(stringr::str_c(val[1:4], collapse = "\\\\newline "),xsmall) + # Prvi del + t1 <- stringr::str_c(val[1:4], collapse = "\\\\newline ") - #x <- gsub("\\\\\\newline \\\\\\begin{footnotesize} ", "sd", x, fixed = T) + if(grepl("\\\\newline", substr(t1, nchar(t1)-10, nchar(t1))) == FALSE) { + t1 <- paste0( t1, "\\\\newline") + } + x <- paste0( t1,xsmall) + + } return(x) } @@ -354,7 +360,7 @@ colnames(mydf) <- labels #par(col="#004078", font = 2, cex = 1.4) -par(col="#004078", font = 2, cex = 1.2, xpd = TRUE) +par(col="#004078", font = 2, cex = 1.1, xpd = TRUE) # Plot a radar chart radarchart2( mydf,