Helper for creating a treemap chart
Arguments
- bb
A
billboard
htmlwidget
object.- data
A
data.frame
, the first column will be used for x axis unless specified otherwise inmapping
. If not adata.frame
, an object coercible todata.frame
.- mapping
Mapping of variables on the chart, see
bbaes
.- ...
Arguments passed to
bb_treemap
.
Examples
library("billboarder")
data("mpg", package = "ggplot2")
billboarder() %>%
bb_treemapchart(mpg[, 1])
billboarder() %>%
bb_treemapchart(
data = mpg,
mapping = aes(x = manufacturer),
label = list(show = TRUE, threshold = 0.3)
) %>%
bb_data(
labels = list(colors = "#FFF")
)
#> Non unique values in 'manufacturer' : calculating sum of 'rep(1, length(manufacturer))'