简体   繁体   English

GoogleVis不会在RStudio中显示图表

[英]GoogleVis does not show chart in RStudio

I am trying to use googleVis-0.5.10 with RStudio 0.99.473 on Windows 7. I can generate charts just fine, but they always opened in a new browser window. 我试图在Windows 7上使用googleVis-0.5.10和RStudio 0.99.473。我可以很好地生成图表,但它们总是在新的浏览器窗口中打开。 The code is simple, no extra options are set: 代码很简单,没有设置额外的选项:

lineChart <- gvisLineChart(data,
                       options = list(
                         selectionMode = "multiple",
                         focusTarget = "category",
                         tooltip = "{ trigger : 'focus', aggregationTarget: 'auto' }")
                       )
plot(lineChart)

I have tried to call viewer manually by providing url from the opened browser window: 我试图通过从打开的浏览器窗口提供URL来手动调用查看器:

rstudio::viewer("http://127.0.0.1:10529/custom/googleVis/LineChartIDc6837e37021.html")

But it shows almost an empty screen: 但它显示几乎是一个空屏幕:

在此输入图像描述

I think it is some kind of a security issue as when I right click RStudio Viewer window and open web inspector, I see there is a javascript error: 我认为这是一种安全问题,因为当我右键单击RStudio Viewer窗口并打开Web检查器时,我看到有一个javascript错误:

Failed to load resource: Unable to init SSL Context:  https://www.google.com/jsapi?callback=displayChartLineChartIDc6837e37021

If I am right, is there a way to instruct RStudio to trust content from www.google.com domain? 如果我是对的,有没有办法指示RStudio信任来自www.google.com域的内容? Or, if I am wrong, how can I fix the problem? 或者,如果我错了,我该如何解决问题呢?

Thank you. 谢谢。

I think your flash player is not enabled. 我认为您的Flash播放器未启用。 In chrome type: 在铬类型:

chrome://plugins

and check the flash player checkbox and try again. 并选中Flash player复选框,然后重试。

Inda's answer is correct, except now the path to change your Chrome flash settings is Inda的回答是正确的,除了现在更改Chrome闪存设置的路径是

chrome://settings/content 铬://设置/内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM