Learn R Programming

billboarder (version 0.2.4)

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)

Arguments

bb

A billboard htmlwidget object.

title

Plot title.

x

Label for x axis.

y

Label for y axis.

caption

Caption for the chart.

Value

A billboard htmlwidget object.

Examples

Run this code
# NOT RUN {
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.rte-france.com)")

# }

Run the code above in your browser using DataLab