-
Notifications
You must be signed in to change notification settings - Fork 37
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
Shiny Animation Issue #132
Comments
Thanks for your interest in animint, and thanks for your detailed bug report. I have created a unit test in #133 that captures your problem and I will ask my collaborators to look into it. |
Great, thank you @tdhock! Let me know if there is anything I can do to assist. |
@tdhock any luck in solving this? |
My collaborators and I have not yet had time to figure it out. If you have time, look at the JS errors shown in #133 and see if you can fix the code in animint.js --seems to have something to do with our use of selectize widgets. We would be more than willing to accept a Pull Request that fixes this! Also you may want to try a workaround: disabling selectize widgets https://github.com/tdhock/animint/wiki/Advanced-features-present-animint-but-not-in-ggplot2#use-selectize-option-to-showhide-selector-widgets Can you try output$animint <- renderAnimint({
list(plot1 = plotBubble(),
selectize=list(selectize=list(year=FALSE),
time = list(variable = "year", ms = 2000),
duration=list(year=4))
})
Not sure if that will help but it is worth a try I think. |
The selectize suggestion did not work....I am playing with animint.js now. |
Thanks for working on this! I installed the current master and now the motion does not even work in RStudio. I cannot use devtools::install_github("tdhock/animint@animation-fix") as I am behind a firewall...so I have to use devtools::install_local. Is there a different source I should use other than animint-master.zip? |
too bad it is not working for you. can you post the specific data set and code that you used? and your session info?
|
Sure. server.R library(shiny)
library(animint)
data<-readRDS("data/data.rds")
shinyServer(function(input, output) {
plotBubble <- reactive({
ggplot()+
geom_point(aes(Plan.Cost.PMPY, X..Contribution , colour=MCI, showSelected=Year, size=Rx.Volume.PMPY),data=data)+
geom_text(aes(Plan.Cost.PMPY, X..Contribution , colour=MCI, label=MCI, showSelected=Year),data=data)+
continuous_scale("size","area",palette=function(x){scales:::rescale(sqrt(abs(x)), c(2,20), c(0,1))},breaks=10^(4:9))+
theme(text=element_text(colour="white"),axis.text=element_text(color="white"),plot.background=element_rect(fill = "#3475b4"),panel.background = element_rect(fill = "#3475b4"),legend.position="none",panel.grid.minor = element_line(colour="white", size=0.5)) +
theme_animint(height = 600, width = 900)
})
output$animint <- renderAnimint({
list(plot1 = plotBubble(),
time = list(variable = "Year", ms = 2000),
duration=list(Year=4))
})
}) ui.R library(shiny)
library(animint)
shinyUI(fluidPage(
titlePanel("Drug Trend"),
br(),
animintOutput("animint")
)) > devtools::session_info()
Session info------------------------------------------------------------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.1.1 (2014-07-10)
system x86_64, linux-gnu
ui RStudio (0.98.1056)
language (EN)
collate en_US.UTF-8
tz <NA>
Packages----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
package * version date source
animation * 2.3 2014-07-25 CRAN (R 3.1.1)
animint * 2016.3.1 2016-03-04 local (/@)
assertthat 0.1 2013-12-06 CRAN (R 3.1.1)
base64enc 0.1.2 2014-06-26 CRAN (R 3.1.1)
chron 2.3.45 2014-02-11 CRAN (R 3.1.1)
codetools 0.2.8 2011-02-15 CRAN (R 3.1.1)
colorspace 1.2.4 2013-09-30 CRAN (R 3.1.1)
data.table * 1.9.6 2015-09-19 CRAN (R 3.1.1)
DBI 0.3.1 2014-09-24 CRAN (R 3.1.1)
devtools 1.6.1 2014-10-07 CRAN (R 3.1.1)
digest 0.6.4 2013-12-03 CRAN (R 3.1.1)
doParallel * 1.0.8 2014-02-28 CRAN (R 3.1.1)
dplyr * 0.4.1 2015-01-14 CRAN (R 3.1.1)
DT * 0.1.39 2015-10-07 local
dygraphs * 0.5 2015-10-20 CRAN (R 3.1.1)
foreach * 1.4.2 2014-04-11 CRAN (R 3.1.1)
ggplot2 * 1.0.1 2016-02-15 local (/@)
googleVis * 0.5.8 2015-01-22 CRAN (R 3.1.1)
gridExtra * 2.0.0 2015-07-14 CRAN (R 3.1.1)
gtable * 0.1.2 2012-12-05 CRAN (R 3.1.1)
hexbin * 1.27.1 2015-08-19 local (/@)
htmltools 0.3 2015-12-29 CRAN (R 3.1.1)
htmlwidgets 0.4 2015-05-28 local
httpuv 1.3.3 2015-08-04 local (/@)
iterators * 1.0.7 2014-04-11 CRAN (R 3.1.1)
jsonlite 0.9.13 2014-10-21 CRAN (R 3.1.1)
labeling 0.3 2014-08-23 CRAN (R 3.1.1)
lattice 0.20.29 2014-04-04 CRAN (R 3.1.1)
lazyeval 0.1.9 2014-10-01 CRAN (R 3.1.1)
lubridate * 1.3.3 2013-12-31 CRAN (R 3.1.1)
magrittr 1.0.1 2014-05-15 CRAN (R 3.1.1)
MASS 7.3.35 2014-09-30 CRAN (R 3.1.1)
memoise 0.2.1 2014-04-22 CRAN (R 3.1.1)
mime 0.3 2015-03-29 CRAN (R 3.1.1)
munsell 0.4.2 2013-07-11 CRAN (R 3.1.1)
networkD3 * 0.2.8 2015-12-31 CRAN (R 3.1.1)
NLP * 0.1.8 2015-07-03 CRAN (R 3.1.1)
plyr 1.8.1 2014-02-26 CRAN (R 3.1.1)
proto * 0.3.10 2012-12-22 CRAN (R 3.1.1)
R6 2.0 2014-08-19 CRAN (R 3.1.1)
RColorBrewer * 1.1.2 2014-12-07 CRAN (R 3.1.1)
Rcpp 0.12.3 2016-01-10 CRAN (R 3.1.1)
reshape2 * 1.4 2014-04-23 CRAN (R 3.1.1)
RJSONIO * 1.3.0 2014-07-28 local (/@)
rstudioapi 0.1 2014-03-27 CRAN (R 3.1.1)
scales 0.2.4 2014-04-22 CRAN (R 3.1.1)
sendmailR * 1.2.1 2014-09-21 CRAN (R 3.1.1)
servr * 0.1 2013-10-05 CRAN (R 3.1.1)
shiny * 0.13.0 2016-01-12 CRAN (R 3.1.1)
shinyBS * 0.61 2015-03-31 CRAN (R 3.1.1)
slam 0.1.32 2014-04-02 CRAN (R 3.1.1)
SnowballC * 0.5.1 2014-08-09 CRAN (R 3.1.1)
stringi 0.4.1 2014-12-14 CRAN (R 3.1.1)
stringr * 1.0.0 2015-04-30 CRAN (R 3.1.1)
tm * 0.6.1 2015-05-07 CRAN (R 3.1.1)
wordcloud * 2.5 2014-06-13 CRAN (R 3.1.1)
xtable 1.7.4 2014-09-12 CRAN (R 3.1.1)
xts * 0.9.7 2014-01-02 CRAN (R 3.1.1)
zoo * 1.7.11 2014-02-27 CRAN (R 3.1.1) |
I am trying to create a bubbleMotion chart for a Shiny application using renderAnimint, but the animation is not working.
I can get the animation to work in R/Rstudio. However, when running that same code via Shiny App it plots, but the animation will not trigger.
server.R:
ui.R
Here is the plot within the Shiny app called from a URL:
Clicking "Play" does not do anything...however, it properly runs through 4 years of data in R/RStudio with this same code.
Please advise.
Thanks,
Logan
The text was updated successfully, but these errors were encountered: