我正在制作交互式多层树图并将它们导出为HTML文件 - 这就是我的代码的样子:
library(googleVis) #not really needed, only using the datset "Fruit" in example
library(treemap)
library(d3treeR)
fruitTree <- d3tree(
treemap(Fruits,
index=c("Fruit", "Year"),
vSize="Profit",
vColor="Fruit"
)
,rootname = "Fruit")
htmlwidgets::saveWidget(as.widget(fruitTree), "D:/temp/fruit.html")
我不喜欢默认的字体大小,我没有找到任何操作它们的选项(至少对于交互式的vizs。当使用'treemap'命令时)。
这是输出的样子:
非常感谢任何帮助。