MultiBarChart (nvd3) in rCharts not showing

I am using a rChart

library to generate javascript graphs directly from the statistical package R. I am trying to calculate multiBarChart

, but the graph seems to be blank.

EDIT Moreover, none of the examples here show up on my computer: https://github.com/ramnathv/rCharts/blob/master/inst/libraries/nvd3/examples.R all examples are empty. Also some1 has a similar issue and is probably proxy related: https://github.com/ramnathv/rCharts/issues/624 .

This code worked on my other computer.

Any idea what is going on and how to fix it?

Objects to reproduce this error:

WhoAndWhere2Viz <- loadFromGithubRepo("cb754ba1e5b9542cdf982d1491c07099",
                   repo = "Museum",
                   user = "MarcinKosinski",
                   value =TRUE )

      

And the barchart himself

 library(rCharts)
 n1 <- nPlot( count ~ domena, group = "kto", data = WhoAndWhere2Viz,
                    type="multiBarChart")
       n1$addParams(dom = "myChart")
       n1$chart(color = c('brown', '#594c26', 'blue',  'green'))
 n1

      

My session information

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.2 LTS

locale:
 [1] LC_CTYPE=pl_PL.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=pl_PL.UTF-8        LC_COLLATE=pl_PL.UTF-8    
 [5] LC_MONETARY=pl_PL.UTF-8    LC_MESSAGES=pl_PL.UTF-8   
 [7] LC_PAPER=pl_PL.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=pl_PL.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

loaded via a namespace (and not attached):
[1] tools_3.2.0

      

+3


source to share


4 answers


Similar to this example in the brilliant papers on each localization:



https://gist.github.com/ramnathv/5531732

0


source


I have the same problem. I cannot view in the browser unless I save it as an html file.

Try the following:

   n1$save('test.html', cdn=FALSE)

      



Also, taking a step even brighter, see this example:

https://gist.github.com/ramnathv/5531732

Use renderChart2 instead of renderChart.

0


source


Searching here I got a solution

Insert Option 1: Iframe Inline This first option is to embed the chart as an inline iframe. The advantage is keeping the html separate but isolating the diagram from the html on the page, thus avoiding css and js conflicts. However, this feature is not supported by IE and Opera.

n1$show('iframesrc', cdn = FALSE)

      

0


source


try it

 n1$addParams(dom = "myChart", "nvd3")

      

-1


source







All Articles