我想要实现的用户可以灵活地禁用/启用二级过滤器 id2('Resource') 和 id3('Case'):
id2('Resource')
并id3('Case')
启用:程序根据 id1、id2 和 id3 过滤器显示相关结果id2('Resource')
并id3('Case')
禁用:程序仅显示级别 1 id1('ThrouputTime') 过滤结果。
我在下面实现(pheusdo)代码,程序将在SAMETIME根据这3个过滤器获取结果,但无法实现上述第二种情况。有什么建议吗?
ui <- dashboardPage(
dashboardBody(
tabItems(
tabItem(tabName = "dashboard",
fluidRow(
box(
title = "ThrouputTime",
width = 3,
sliderInput(inputId="id1", label="ThrouputTime", ...)
)
),
fluidRow(
box(
title = "Resource",
width = 3,
selectInput(inputId="id2", label="resource", ...)
),
box(
title = "Case",
width = 3,
selectInput(inputId="id3", label="case", ...)
)
)
)
)
)
server <- function(input, output, session){
observe({
output$process <- renderProcessanimater(expr = {
filtered_event <- newevent %>%
filter_throughput_time(interval = c(input$throughput[1], input$throughput[2])) %>%
filter_resource(input$id2) %>%
filter_case(input$id3, reverse = F)
#.... generate a workflow graph based on 'filtered_event' from above
})
})
}
graph <- shinyApp(ui, server)
runApp(graph, host = "0.0.0.0", port = 5050)