Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charts are not loading #89

Closed
mubashirqasim opened this issue Jun 16, 2020 · 5 comments
Closed

Charts are not loading #89

mubashirqasim opened this issue Jun 16, 2020 · 5 comments

Comments

@mubashirqasim
Copy link

Hi there,

Just a heads up...

For some reason, none of the charts are loading on the following website or on my shiny app:

https://cran.r-project.org/web/packages/googleVis/vignettes/googleVis_examples.html

It might be due to missing js file:

image

Cheers.

@mages
Copy link
Owner

mages commented Jun 16, 2020

Thanks for reporting this issue. I have updated the link to the Google JavaScript function. Can you please test with googleVis 0.6.6 from GitHub.

@beansrowning
Copy link

I am also encountering this issue (though it may be for a different reason).

I'm on 0.6.6, R Version 4.0.1.

If I print a viz with tag = NULL or tag="html", the chart normally pops up.

If I try and embed the figure in an Rmarkdown document using tag = "chart", the chart does not render.
Trying to run the viz function from the DOM also fails:

gvisDataTreeMapID23246cc47a7d()
#> exploration.html:461 Uncaught TypeError: Cannot read property 'DataTable' of undefined
#>    at gvisDataTreeMapID23246cc47a7d (exploration.html:461)
#>    at <anonymous>:1:1

@mages
Copy link
Owner

mages commented Jun 23, 2020

Thanks for your comment. It seems the line <script type="text/javascript\" src="https://www.google.com/jsapi?callback=displayChart%s"></script> which is generated by the plot or print calls is replaced in the rendering process with the actual content of https://www.google.com/jsapi?callback
I am not sure if this is due to changes in knitr, rmarkdown or pandoc.

@mages
Copy link
Owner

mages commented Jun 24, 2020

Setting the option self_contained to false in the YAML header of the RMarkdown file seems to resolve the issue:

output:
  html_document:
    self_contained: false

@mages
Copy link
Owner

mages commented Jul 8, 2020

New version of googleVis 0.6.6 CRAN, with the vignettes showing the charts again: https://cran.r-project.org/web/packages/googleVis/index.html

@mages mages closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants