When I save the code for a Motion Chart into an html file and try to open it, I get the footer and the "initializing" progress bar blinks for a split second, but nothing else shows up.
so
M1 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
plot(M1)
works great, but
print(M1, file='d:/delete/fruit.html')
and then opening the resulting file in a browser comes up blank (except for the footer). Is there a way I can save this visualization and circulate it around?
As I understand it, the file has to be displayed via a web server to show the chart
http://code.google.com/apis/chart/interactive/docs/gallery/motionchart.html#Notes
Because of Flash security settings, this (and all Flash-based visualizations) might not work correctly when accessed from a file location in the browser (e.g., file:///c:/webhost/myhost/myviz.html) rather than from a web server URL (e.g., http://www.myhost.com/myviz.html). This is typically a testing issue only. You can overcome this issue as described on the Macromedia web site.
The plot command in R uses the internal R http help server to overcome this limitation.
Here's how I overcame it:
Now open your googleVis html file and it should display successfully. In fact, any googleVis file you open from within the folder you selected will also display as you would expect.
On Google Chrome v21 & Windows 7, there is an issue with 'browse for folder' : it will open the 'browse for files' -window which does not allow you to choose a folder correctly. For now, a workaround is to disable the PepperFlash -plugin: for details see
https://productforums.google.com/forum/#!starred/chrome/qdBApWR6xPc%5B1-25%5D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With