【发布时间】:2016-03-11 00:45:47
【问题描述】:
给定:
df <- data.frame(var = letters[1:26], count = sample(1:300, 26),
label = sample(toupper(letters[1:5]), 26, replace = T))
library(rCharts)
p4 <- nPlot(count ~ var, data = df, type = 'pieChart',
width = 500, height=500)
p4$chart(tooltipContent = "#! function(x, y){
return 'Type: ' + x + '<br>Count: ' + y
} !#")
p4
我可以关闭/删除顶部的图例吗?还是从顶部向左/向右移动?
【问题讨论】:
-
没关系:
p4$chart(showLegend = FALSE)成功了