William David
William David

Reputation: 41

Display a googleVis plot in knitr html document

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

Upvotes: 3

Views: 157

Answers (0)

Related Questions