我正在尝试制作一个显示不同图表的仪表板。由于有很多数据要处理,绘图或图表需要一些时间才能显示,而这种延迟发生我使用了很多默认微调器,但要求是显示加载百分比
library(shiny)
library(shinybusy)
ui <- fluidPage(
busy_start_up(
loader = spin_kit(
spin = "cube-grid",
color = "#FFF",
style = "width:50px; height:50px;"
),
text = "Loading...",
mode = "manual",
color = "#FFF",
background = "#112446"
),
tags$h1("Ready to play!", class = "text-center")
)
server <- function(input, output, session) {
# Remove after 3 seconds (+timeout)
observe({
Sys.sleep(3)
remove_start_up(timeout = 200)
})
}
if (interactive())
shinyApp(ui, server)