Comments (3)
Does the process map not display at all, or is only the animation missing?
I remember that I had some trouble with the process map not having any height if the height was not explicitly set within a complex Shiny application. Theoretically, each container should adapt the the size of its parent, but sometimes this does not work, but I did not find out how to fix it.
You would need to give the full example, since I tried to reproduce it with your code and it does show the animation for me (using the current development version on Github):
my_ianimate_process <- function (eventlog) {
ui <- function(request) {
fluidPage(mainPanel(width = 10, shinycssloaders::withSpinner(processanimaterOutput("process")))) }
server <- function(session, input, output) { output$process <- renderProcessanimater(expr = { animate_process(eventlog) })
}
shinyApp(ui, server)
}
library(eventdataR)
my_ianimate_process(patients)
from processanimater.
Thanks for your quick reply, and I tried your code on my computer, while it does not work.
There were nothing displayed.
Here is my sessionInfo():
_R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] svgPanZoom_0.3.3 DiagrammeRsvg_0.1 XML_3.98-1.11 RColorBrewer_1.1-2 treemap_2.4-2 data.table_1.11.4 dplyr_0.7.6 DT_0.4 lubridate_1.7.4
[10] ggplot2_2.2.1 stringr_1.3.1 DiagrammeR_1.0.0 shinythemes_1.1.1 bindrcpp_0.2.2 processanimateR_0.1.1 shiny_1.1.0 shinydashboard_0.7.0 petrinetR_0.1.0
[19] processmonitR_0.1.0 xesreadR_0.2.2 processmapR_0.3.1 eventdataR_0.2.0 edeaR_0.8.1 bupaR_0.4.1
loaded via a namespace (and not attached):
[1] viridis_0.5.1 httr_1.3.1 tidyr_0.8.1 jsonlite_1.5 viridisLite_0.3.0 shinyTime_0.2.1 assertthat_0.2.0 yaml_2.1.19 pillar_1.2.3
[10] glue_1.2.0 downloader_0.4 digest_0.6.15 promises_1.0.1 colorspace_1.3-2 shinycssloaders_0.2.0 htmltools_0.3.6 httpuv_1.4.4.1 plyr_1.8.4
[19] pkgconfig_2.0.1 purrr_0.2.5 xtable_1.8-2 scales_0.5.0 brew_1.0-6 later_0.7.3 tibble_1.4.2 influenceR_0.1.0 lazyeval_0.2.1
[28] cli_1.0.0 rgexf_0.15.3 crayon_1.3.4 magrittr_1.5 mime_0.5 forcats_0.3.0 xml2_1.2.0 ggthemes_3.5.0 Rook_1.1-1
[37] tools_3.5.1 hms_0.4.2 gridBase_0.4-7 plotly_4.7.1 V8_1.5 munsell_0.5.0 compiler_3.5.1 rlang_0.2.1 grid_3.5.1
[46] rstudioapi_0.7 htmlwidgets_1.2 visNetwork_2.0.4 igraph_1.2.1 miniUI_0.1.1.1 labeling_0.3 gtable_0.2.0 curl_3.2 reshape2_1.4.3
[55] R6_2.2.2 gridExtra_2.3 utf8_1.1.4 bindr_0.1.1 readr_1.1.1 stringi_1.1.7 Rcpp_0.12.17 tidyselect_0.2.4_ _
I think the problem may be that the packages I am using is not compatible.
By the way, I tried some code, and find the following code works:
`
library(bupaR)
library(processanimateR)
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(),
dashboardBody(
# Boxes need to be put in a row (or column)
fluidRow(
box(
width = 12,
tags$head(tags$style("#process{height:90vh !important;}")),
mainPanel(width = 10, shinycssloaders::withSpinner(processanimaterOutput("process")))
),
box(
title = "Controls",
sliderInput("slider", "Number of observations:", 1, 100, 50)
)
)
)
)
server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
})
output$process <- renderProcessanimater(expr = {
model <- process_map(patients, render = F) %>% DiagrammeR::add_global_graph_attrs(attr = "rankdir",
value = input$orientation, attr_type = "graph")
animate_process(patients, model)
})
}
shinyApp(ui, server)
`
from processanimater.
I understand that the original problem might have to do with v0.1.1 in combination with an older processmapR version 0.3.1. Please open this again in case you still have problems with the new version 0.2.0, which is to be release on CRAN very soon.
from processanimater.
Related Issues (20)
- Lag when token dissapear at the end HOT 1
- Refactor animation library into stand-alone JS project
- process maps seem to be rendering strangely with latest diagrammeR HOT 1
- Performance regression in Chrome pre-80 HOT 2
- Support heuristicsmineR Causal nets HOT 2
- Migrate from SMIL animations to WebGL or Canvas
- Leaflet Rendering is not working in R 3.6.3 HOT 5
- Animation slider time mismatch in animate_process HOT 4
- Animate Process - R Studio - Viewer HOT 2
- Don't see infrequent edges. Is it possible?
- Animate queue length on activities HOT 4
- processanimater-legend : disappears - shinydashboard - multiple tabs - animate process HOT 5
- Cannot display French properly
- Modifying the timeline length
- Repeating Activity/Node selection multiple times!
- `sec` argument errors in branch activity-animate
- Time out of sync in animate_process?
- Animate Process Using Milliseconds
- Handling of Parallel activities
- Must call bupaR::to_eventlog() when using absolute or relative animation mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from processanimater.