2
我开始为我的UI和服务器使用闪亮的模块。我有一个dygraph图例显示的特定问题。r dygraph和闪亮的模块
在使用闪亮模块之前,我只能在我的UI中显示图形和图例。一旦我使用了模块,它就停止工作。难道是dygraph的传说不是一个被动的输出?
没有光泽moudles(作品)
...
tabPanel("Plot",dygraphOutput("plot1"),
textOutput("legendDivID"))
...
的dygraph服务器代码:
output$plot1 <- renderDygraph({
dygraph(dfplot())%>%
dyLegend(labelsDiv = "legendDivID", labelsSeparateLines = T)%>%
dyRangeSelector()
})
现在我建立我闪亮的模块
StockUI<-function(id, label= "aaa"){
ns <- NS(id)#Named space
...
tabPanel("Plot",dygraphOutput(ns("plot1")),
textOutput(ns("legendDivID"))}
Stock <- function(input,output,session){
...
output$plot1 <- renderDygraph({dygraph(foo())%>%
dyLegend(labelsDiv = "legendDivID", labelsSeparateLines = T)%>%
dyRangeSelector()
})
}
但传说已不再显示,它在闪亮的模块外正常工作。