renderGvis <- function(expr, env=parent.frame(), quoted=FALSE) {
# Convert expr to a function
func <- shiny::exprToFunction(expr, env, quoted)
function() {
chart <- func()
paste(chart$html$chart, collapse="\n")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.