bb_labs | R Documentation |
Quickly set title, axis labels and caption
bb_labs(bb, title = NULL, x = NULL, y = NULL, caption = NULL, ...)
bb |
A |
title |
Text for the chart title, use |
x |
Text for x axis title. |
y |
Text for y axis title. |
caption |
Text for the caption displayed in the bottom-right of the chart. |
... |
Not used. |
A billboard
htmlwidget
object.
caption
is not part of the billboard.js library, it is added by the billboarder
package.
data("prod_par_filiere")
billboarder() %>%
bb_barchart(
data = prod_par_filiere[, c("annee", "prod_hydraulique")],
color = "#102246"
) %>%
bb_legend(show = FALSE) %>%
bb_labs(
title = "French hydraulic production",
y = "production (in terawatt-hours)",
caption = "Data source: RTE (https://opendata.reseaux-energies.fr/)",
caption_href = "https://opendata.reseaux-energies.fr/"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.