bb_piechart | R Documentation |
Helper for creating a pie chart
bb_piechart(bb, data, mapping = NULL, ...)
bb |
A |
data |
A |
mapping |
Mapping of variables on the chart, see |
... |
Arguments for slot pie, https://naver.github.io/billboard.js/release/latest/doc/Options.html#.pie. |
A billboard
htmlwidget
object.
This function can be used with billboarderProxy
in shiny application.
stars <- data.frame(
package = c("billboarder", "ggiraph", "officer", "shinyWidgets", "visNetwork"),
stars = c(9, 177, 43, 44, 169)
)
# Default
billboarder() %>%
bb_piechart(data = stars)
# Explicit mapping
billboarder() %>%
bb_piechart(data = stars, bbaes(package, stars))
# Other way to specify mapping
billboarder(data = stars) %>%
bb_aes(package, stars) %>%
bb_piechart()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.