bb_piechart {billboarder} | R Documentation |
Helper for creating a pie chart
Description
Helper for creating a pie chart
Usage
bb_piechart(bb, data, mapping = NULL, ...)
Arguments
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. |
Value
A billboard
htmlwidget
object.
Note
This function can be used with billboarderProxy
in shiny application.
Examples
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()
[Package billboarder version 0.4.1 Index]