50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

billboarder (version 0.5.0)

bb_labs: Quickly set title, axis labels and caption

Description

Quickly set title, axis labels and caption

Usage

bb_labs(bb, title = NULL, x = NULL, y = NULL, caption = NULL, ...)

Value

A billboard

htmlwidget object.

Arguments

bb

A billboard htmlwidget object.

title

Text for the chart title, use \n to make a new line.

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.

Examples

Run this code
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/"
  )

Run the code above in your browser using DataLab