【问题标题】:rCharts nplot piechart, turn off legend/toggle buttonsrCharts nplot 饼图,关闭图例/切换按钮
【发布时间】: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) 成功了

标签: r rcharts


【解决方案1】:

我将发布我自己的答案,因此此问题已结束。

p4$chart(showLegend = FALSE)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-30
    • 1970-01-01
    • 2021-07-20
    相关资源
    最近更新 更多