Closed alanocallaghan closed 7 years ago
Thanks @Alanocallaghan for noticing and fixing this issue!
One issue I am noticing though with new plotly + this patch is that in an rmarkdown only the first plot made by iheatmapr shows up in the html. However, if a regular plotly plot is added as well, then all the plots show up...
If you post an example I'll look into it
The vignette is an example -- adding plotly::plot_ly(x =1:5,y=1:5)
in a chunk anywhere in the document seems to make the problem go away
Bizarre! A workaround would be to put that in a block starting {r, echo=FALSE}
but that's not a great fix
It seems like adding in the additional dependencies that plotly r package uses, in particular crosstalk::crosstalkLibs()
is necessary for multiple iheatmapr plots to show up in rmarkdown. Adding a plotly plot was a fix because the html would then load those libraries when making the plot.
Hi @Alanocallaghan, I decided to address the problem a different way, by removing the dependency on plotly r package in order to have more control over things like the version of plotly.js and other aspects of making the htmlwidget (as outlined in #7). I'm going to close this pull request and the corresponding issue. Thanks again for detecting this problem and suggesting a fix!
Address #6