Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bb_axis

Add axis parameters


Description

Add axis parameters

Usage

bb_axis(bb, ...)

bb_x_axis(bb, ...)

bb_y_axis(bb, ...)

Arguments

bb

A billboard htmlwidget object.

...

Arguments defined in https://naver.github.io/billboard.js/demo/.

Value

A billboard htmlwidget object.

Examples

stars <- data.frame(
  package = c("billboarder", "ggiraph", "officer", "shinyWidgets", "visNetwork"),
  stars = c(9, 178, 43, 46, 175)
)

# Add a label to y axis
billboarder() %>% 
  bb_barchart(data = stars) %>% 
  bb_axis(y = list(label = list(text = "# of stars", position = "middle")))
  
# or shorter :
billboarder() %>% 
  bb_barchart(data = stars) %>% 
  bb_y_axis(label = list(text = "# of stars", position = "outer-top"))

billboarder

Create Interactive Chart with the JavaScript 'Billboard' Library

v0.3.1
MIT + file LICENSE
Authors
Victor Perrier [aut, cre], Fanny Meyer [aut], NAVER Corp [cph] (billboard.js library), Mike Bostock [cph] (d3.format library)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.