【问题标题】:Remove footers from googleVis output从 googleVis 输出中删除页脚
【发布时间】:2016-01-23 22:33:12
【问题描述】:

有没有办法从googleVis 输出中删除或隐藏页脚?这是每个 googleVis 输出中显示的内容。

数据:sport • 图表 ID:TimelineID95891e64f3 • googleVis-0.5.10
R 版本 3.2.3 (2015-12-10) • Google 使用条款 • 文档和数据政策

【问题讨论】:

    标签: r googlevis


    【解决方案1】:

    创建你的可视化

    M <- gvisColumnChart(data, xvar = "", yvar = "", options = list(), chartid)
    

    然后删除页脚和标题

    M$html$footer <- NULL
    M$html$jsFooter <- NULL
    M$html$caption <- NULL
    

    然后打印或绘制图表

    print(M,tag = "html" ,file = "M.html") 
    plot(M)
    

    【讨论】:

    • 这合法吗? developers.google.com/terms 请参阅禁止: 9. 删除、隐藏或更改任何 Google 服务条款或这些条款的任何链接或通知。我的意思是它仍然在源代码注释中,但我不确定是否可以删除这个难看的标题/页脚。
    【解决方案2】:

    您可以通过设置全局选项来自定义 jsFooter。在这里,我将 plot.tag 设置为 chart 并将 jsFooter 设置为 NULL,这将完全删除页脚。

    op <- options(gvis.plot.tag="chart", jsFooter=NULL)
    

    使用getOption("gvis.tags") 查看您可以自定义的其他标签列表。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-03
      • 2015-10-01
      相关资源
      最近更新 更多