hgch_treemap.Rd
Creates a treemap chart using Highcharter library.
hgch_treemap(data, dic = NULL, var_cat = NULL, var_num = NULL, ...)
a data frame containing the variables to be plotted.
a named list, each element corresponding to a column name in data
and defining a set of labels for that column.
a character vector with the names of categorical variables.
a character vector with the names of numerical variables.
additional arguments to be passed to dsviz_default_opts
a Highcharter treemap chart.
data(mtcars)
mtcars$cyl <- as.character(mtcars$cyl)
mtcars <- mtcars |> dplyr::group_by(cyl) |> dplyr::summarise(mpg = mean(mpg))
hgch_treemap(mtcars, var_cat = "cyl", var_num = "mpg")
#> in theme_datasketch