Description Usage Arguments Examples
View source: R/hchart-shorcuts.R
This function helps to create highcharts treemaps from treemap
objects
from the package treemap
. NOTE: This function is deprecated. Please use hctreemap2
instead.
1 |
tm |
A |
... |
Additional shared arguments for the data series (https://api.highcharts.com/highcharts/series). |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
library("treemap")
library("viridis")
data(GNI2014)
head(GNI2014)
tm <- treemap(GNI2014,
index = c("continent", "iso3"),
vSize = "population", vColor = "GNI",
type = "comp", palette = rev(viridis(6)),
draw = FALSE
)
hctreemap(tm, allowDrillToNode = TRUE, layoutAlgorithm = "squarified") %>%
hc_title(text = "Gross National Income World Data") %>%
hc_tooltip(pointFormat = "<b>{point.name}</b>:<br>
Pop: {point.value:,.0f}<br>
GNI: {point.valuecolor:,.0f}")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.