rstudio / revealjs

R Markdown Format for reveal.js Presentations
Other
325 stars 85 forks source link

ggvis #17

Closed PMassicotte closed 8 years ago

PMassicotte commented 8 years ago

Hi.

It seems that ggvis interactive plots are not working with revealjs.

Here a minimal example where the slider is not working (or even showing).


---
  output:
  revealjs::revealjs_presentation

---

```{r, fig.width = 3, fig.height=3}

library(ggvis)
mtcars %>% ggvis(~mpg, ~wt) %>% 
  layer_smooths(span = input_slider(0.5, 1, value = 1)) %>%
  layer_points(size := input_slider(100, 1000, value = 100))


This produces the following error:

Warning: Can't output dynamic/interactive ggvis plots in a knitr document.
Generating a static (non-dynamic, non-interactive) version of the plot.

Anyone know a work around?

Thank you,
Philippe
junkka commented 8 years ago

This is a limitation of knitr which can only produce static plots. I recommend using http://shiny.rstudio.com for interactive applications.

PMassicotte commented 8 years ago

Ok thank you.