Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't include multiple interactive plots in ioslides_presentation Rmd files #35

Open
kbroman opened this issue Jun 22, 2015 · 5 comments
Labels

Comments

@kbroman
Copy link
Owner

kbroman commented Jun 22, 2015

Reported from Matthew Stephens:

have you tried including multiple interactive plots
in an ioslides_presentation .Rmd file? When I do that it
seems only one of the plots renders... but when I produce
html_document it is fine.

ps it seems to work (almost) ok with output: slidy_presentation
instead of ioslides

@kbroman kbroman added the bug label Jun 22, 2015
@jjallaire
Copy link

Try updating to the very latest version of htmlwidgets on CRAN (v0.5,
submitted yesterday) as it fixes some issues related to multiple widgets in
ioslides (also make sure you are using the latest version of the rmarkdown
package v0.7).

On Sun, Jun 21, 2015 at 10:56 PM, Karl Broman [email protected]
wrote:

Reported from Matthew Stephens http://stephenslab.uchicago.edu:

have you tried including multiple interactive plots
in an ioslides_presentation .Rmd file? When I do that it
seems only one of the plots renders... but when I produce
html_document it is fine.

ps it seems to work (almost) ok with output: slidy_presentation
instead of ioslides


Reply to this email directly or view it on GitHub
#35.

@kbroman
Copy link
Owner Author

kbroman commented Jun 22, 2015

Thanks, @jjallaire!

@kbroman
Copy link
Owner Author

kbroman commented Jun 22, 2015

@jjallaire: There still seem to be some problems with ioslides.

I put an example at this gist. When I initially load the html file into a browser, the first plot will display but the others won't. If I refresh, the others will load, but the first one will may then show up strangely, like this:

screen shot 2015-06-22 at 9 06 37 am

I'm getting console errors like this:

screen shot 2015-06-22 at 9 08 34 am

@jjallaire
Copy link

I think there's an issue with sizing. With ioslides the invisible slide
elements start out as display:none which could throw off your widget.
Here's what I did in dygraphs:

https://github.com/rstudio/dygraphs/blob/master/inst/htmlwidgets/dygraphs.js#L97-L104

On Mon, Jun 22, 2015 at 10:09 AM, Karl Broman [email protected]
wrote:

@jjallaire https://github.com/jjallaire: There still seem to be some
problems with ioslides.

I put an example at this gist
https://gist.github.com/kbroman/fc28c545dcf7ab034271. When I initially
load the html file into a browser, the first plot will display but the
others won't. If I refresh, the others will load, but the first one will
may then show up strangely, like this:

[image: screen shot 2015-06-22 at 9 06 37 am]
https://cloud.githubusercontent.com/assets/53972/8283668/2f941e88-18be-11e5-8b9e-23ce315bdf67.png

I'm getting console errors like this:

[image: screen shot 2015-06-22 at 9 08 34 am]
https://cloud.githubusercontent.com/assets/53972/8283688/5178c26a-18be-11e5-8ed9-1d61f3f91a7e.png


Reply to this email directly or view it on GitHub
#35 (comment).

@stephens999
Copy link

just to say I also tried the update and still have the problem. Just for the record, since Karl seems to be on it...

sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] htmlwidgets_0.4

loaded via a namespace (and not attached):
[1] htmltools_0.2.6 tools_3.2.0 yaml_2.1.13 rmarkdown_0.7 digest_0.6.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants