0
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)'是否有這個訣竅 –