Skip to content

Instantly share code, notes, and snippets.

@pvictor
Last active July 26, 2018 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvictor/6f8b56ab27a92e9f4665bf0ae01696a1 to your computer and use it in GitHub Desktop.
Save pvictor/6f8b56ab27a92e9f4665bf0ae01696a1 to your computer and use it in GitHub Desktop.
Title font size
library(billboarder)
dat <- data.frame(
lib = c("A", "B", "C"),
value = c(34, 54, 62)
)
# Donut title
billboarder() %>%
bb_donutchart(dat) %>%
bb_donut(title = "My title") %>%
bb_add_style(".bb-chart-arcs-title" = "font-size: 80px; fill: red;")
# Main title
billboarder() %>%
bb_donutchart(dat) %>%
bb_donut(title = "Inner title") %>%
bb_title(
text = "Main title",
padding = list(top = 20, right = 10, bottom = 10, left = 10),
position = "left"
) %>%
bb_add_style(
".bb-chart-arcs-title" = "font-size: 36px; fill: red;",
".bb-title" = "font-size: 42px; fill: green;"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment