Skip to content

Commit

Permalink
fix(skeleton): the number of years displayed in the captions
Browse files Browse the repository at this point in the history
Ref: #194
  • Loading branch information
GeraldineGomez committed Aug 1, 2024
1 parent 9f5d749 commit e8fbe71
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inst/rmarkdown/templates/reports/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,15 @@ data_years_filtrada <- geo_filtro(data_event = data_years_limpia,
dpto = params$departamento)
}
casos_years <- agrupar_years(data_event = data_years_filtrada)
years_text <- length(unique(casos_years[["ano"]]))
altura_fig_years <- 5
eventos <- unique(casos_years[["cod_eve"]])
if (length(eventos) > 3) {
altura_fig_years <- 4
}
```

```{r grafica-casos-years, fig.height = altura_fig_years, fig.width = 11, fig.cap = paste0("Distribución de casos en los últimos 5 años - ", text_ext_geo)}
```{r grafica-casos-years, fig.height = altura_fig_years, fig.width = 11, fig.cap = paste0("Distribución de casos en los últimos ", years_text, " años - ", text_ext_geo)}
plot_years(casos_years)
```

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit e8fbe71

Please sign in to comment.