shikharanideo / google-motion-charts-with-r

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

numberFormat option unavailable for gvisTable #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

age=18:29
height=c(72342346.1,72342347,78234234.1,71238.2,71238.8,72349.7,12379.9,223481.1
,81231.2,82341.8,23482.8,82343.5)
test <- data.frame(age=age,height=height)
t1 <- gvisTable(test, options=list(width=800, height=500, numberFormats=','))
cat(t1$html$chart, file="table.html")

I couldn't find documentations on R implementation of this option: 
https://developers.google.com/chart/interactive/docs/reference#numberformatter

What is the expected output? What do you see instead?

I expected to see commas.

What version of the product are you using? On what operating system?

platform       x86_64-apple-darwin9.8.0     
arch           x86_64                       
os             darwin9.8.0                  
system         x86_64, darwin9.8.0          
status                                      
major          2                            
minor          13.0                         
year           2011                         
month          04                           
day            13                           
svn rev        55427                        
language       R                            
version.string R version 2.13.0 (2011-04-13)

googleVis version installed is 0.2.14

Thank you

Original issue reported on code.google.com by estherw...@gmail.com on 7 Jul 2012 at 12:27

GoogleCodeExporter commented 8 years ago
The NumberFormat and other additional JavaScript functions are currently not 
supported in googleVis. 
We are looking for volunteers to help.
The best suggestion from my side would be the following:

test$height <- format(test$height, big.mark=",")
test$height <- gsub(" ", " ", test$height)                               

t1 <- gvisTable(test, options=list(width=800, height=500))
plot(t1)

Original comment by markus.g...@googlemail.com on 12 Jul 2012 at 10:30

GoogleCodeExporter commented 8 years ago
I needed this function for a project of mine, added it into a git repo located 
here : 

https://github.com/jburos/GoogleVis

In case it's useful to anyone .. 

Original comment by jbu...@gmail.com on 21 Aug 2013 at 3:56

GoogleCodeExporter commented 8 years ago
Thanks for the code. I have included your ideas and code into our version as 
well. See here: 
http://code.google.com/p/google-motion-charts-with-r/source/detail?r=372

Original comment by markus.g...@googlemail.com on 21 Aug 2013 at 9:36