Parameters set in set_roboplot_optionsto configure how roboplots are displayed when no data is available.
Usage
set_empty_roboplot(
message = getOption("roboplot.locale")$robotable_labels$emptyTable,
title = T,
caption = T,
modebar = T
)
Arguments
- message
Character. The message you want to display on the empty plot.
- title
Logical. Will the plot show its title.
- caption
Logical. Will the plot show its caption.
- modebar
Logical. Will the modebar show on the plot. Only relevant when roboplot(info_text) has been set. Beside the info_text, the modebar will be empty
Examples
# Your plot might result in a plot without data.
energiantuonti |> dplyr::filter(Alue == "Samoa") |> roboplot(title = "Samoan energiantuonti", caption = "Tilastokeskus")
# Control your empty plot globally with `set_roboplot_options()`. Message is
# the message you wish to present, and control the visibility of title, caption
# and any possible `roboplot(info_text)` from modebar with logicals.
set_roboplot_options(
empty_roboplot = set_empty_roboplot(
message = "Valituilla asetuksilla ei löytynyt dataa.\nKokeile muuttaa asetuksia.",
title = F,
caption = T,
modebar = T
)
)
energiantuonti |>
dplyr::filter(Alue == "Samoa") |>
roboplot(title = "Samoan energiantuonti",
caption = "Tilastokeskus",
info_text = "Dataa ei löytynyt.")