3

i'm new using googleVis and have a problem that i don't know how to manage. How can display a googleVis graphic in a html knitr document?, I see some templates and make this code

---
output:
  knitrBootstrap::bootstrap_document:   
    title: "Test file"
    theme: spacelab
    highlight: Tomorrow
    theme.chooser: FALSE
    highlight.chooser: FALSE
---
```{r results='asis',echo=FALSE,fig.width=14, fig.height=8,fig.align='center', message=F, warning=F}
load("CLTVT.RData") #<-table with data
suppressPackageStartupMessages(library(googleVis))
A4=gvisMotionChart(CLTVT, 
                       idvar="CLTV", 
                       timevar="FECHA")
print(A4,tag='chart')
```

but when I run this code (in Rstudio) the space for the plot is displayed but in blank (when i do this plot directly in R the plot is displayed without problems) . I am missing some detail to run this code properly?, thanks for help

  • you don't need to use print, have you? And if you want to add a div, could I suggest to use divChart inside the ggvis function. – YCR Jan 08 '16 at 11:00
  • Does it display properly if you use a [rmarkdown](http://rmarkdown.rstudio.com/) document instead of knitrBootstrap? – Jim Jan 08 '16 at 12:54

0 Answers0