ululalbab / google-motion-charts-with-r

Automatically exported from code.google.com/p/google-motion-charts-with-r
0 stars 0 forks source link

Problem with exporting charts under OSX #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. rendering any motion chart (e.g. with the Fruits data set) -- possibly this 
extends to other visualization types as well since the problem is not with the 
visualization as such, but with exporting it.
2. saving the source code from within the browser OR clicking on the ID of the 
visualization and copy-pasting the contents of the source code windows OR using 
the print() function
3. opening the exported visualization in any browser

What is the expected output? What do you see instead?
expected is the visualization, instead I see a blank page

What version of the product are you using? On what operating system?
googleVis 0.2.6, R 2.13.0, OSX 10.6.7

Please provide any additional information below.
To clarify: motion charts (and possibly other types of charts) cannot be 
exported, but only work using the plot() function. Any attempt to save-as or 
copy-paste the source code of a working visualization fails even though the 
page source of the page rendered via the R http server 
(http://127.0.0.1:12077/custom/googleVis/....) is superficially identical with 
the page generated with print(). I'm not sure, but perhaps the problem is also 
related to the RJSONIO issue?

Original issue reported on code.google.com by puschm...@gmail.com on 13 Jun 2011 at 2:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I understand, that you can't see the motion chart in your browser when you type 
in the local file name. 

library(googleVis)
M=gvisMotionChart(Fruits, "Fruit", Year)
print(M, file="~/Desktop/motionchart.html")

Now opening the file in you browser doesn't display the chart.

Unfortunately, this is expected, as the motion chart uses Flash and the Google 
API 
(http://code.google.com/apis/visualization/documentation/gallery/motionchart.htm
l) states:
Note for Developers: 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 
Adobe web site.

This is exactly the reason why the googleVis plot command uses the R HTTP help 
web server.
So, you have to store the file somewhere a web server can access this, e.g. in 
your public dropbox folder:

print(M, file="~/Dropbox/Public/motionchart.html")

You will notice, that you don't have this issue with chart using SVG/VML, e.g.

L=gvisLineChart(OpenClose)
print(L, file="~/Desktop/linechart.html")

Does this help?

Original comment by markus.g...@googlemail.com on 13 Jun 2011 at 6:43

GoogleCodeExporter commented 9 years ago

Original comment by markus.g...@googlemail.com on 16 Jun 2011 at 11:22

GoogleCodeExporter commented 9 years ago
Warnings have been added to the help files.
Thanks for your comments.

Original comment by markus.g...@googlemail.com on 9 Aug 2011 at 12:05