树形图在闪亮时工作正常,但是当我转换为闪亮仪表板时,树形图停止工作。它现在只显示一个空白块。任何想法如何解决这一问题?
这是在我的服务器中。R
output$TreeMap<-renderHighchart2({TM1<-hctreemap2(data = M,
group_vars = c("Status","Class","Order", "Family","Species"),
size_var = "n",
color_var = "n",
layoutAlgorithm = "squarified",
levelIsConstant = T,
levels = list(
list(level = 1, dataLabels = list(enabled = T)),
list(level = 2, dataLabels = list(enabled = F)),
list(level = 3, dataLabels = list(enabled = F)),
list(level = 4, dataLabels = list(enabled = F)),
list(level = 5, dataLabels = list(enabled = F))
)) %>%
hc_colorAxis(minColor = brewer.pal(9, "GnBu")[6],
maxColor = brewer.pal(9, "YlOrRd")[8]) %>%
hc_tooltip(pointFormat = "<b>{point.name}</b>:<br>
Number Measured: {point.value:,.0f}")
})
这是在我的 ui.R
tabItem(tabName = "About",
tabsetPanel(
tabPanel("TreeMap",box(width = 12,highchartOutput2("TreeMap",height = "750px"))))