我在用
invalidateLater(5000, session)
Run Code Online (Sandbox Code Playgroud)
在我的闪亮代码中,它正在工作.每隔5秒我就会刷新一个查询并更新一个图表.但是屏幕和图表每隔5秒就会变成灰色,因此在更新发生时看起来页面已经死了.有没有办法让图表更新并让页面看起来像死了?
@JOhn - 谢谢你在这里是我的ui.r.
shinyUI(pageWithSidebar(
headerPanel("tst"),
sidebarPanel(
sliderInput("n", "Number of plots", value=2, min=1, max=7),
width = 2
),
mainPanel(
# This is the dynamic UI for the plots
uiOutput("plots")
)
))
Run Code Online (Sandbox Code Playgroud)
谢谢.
问题在于,当某些内容被更新时,默认的.css会给它一个类,.recalculating
这就是它看起来是灰色的.你可以通过推杆解决这个问题
tags$style(type="text/css",
".recalculating { opacity: 1.0; }"
)
Run Code Online (Sandbox Code Playgroud)
ui.r
如果.css
您正在使用其中一个,请在您的或等同于您.显然,如果你了解CSS,你也可以尝试其他想法.