我想给一个闪亮的应用程序应用一个黑暗的主题:
library(shinythemes)
shinyUI(fluidPage(
theme = shinytheme("cyborg"),
...)但是DT datatable不遵循主题颜色。
我怎么才能让它变暗呢?
非常感谢。
发布于 2020-03-31 18:46:22
除了发布的代码之外,还必须向datatable函数添加以下参数。下面是完全可重现的代码。
library(shiny)
library(DT)
library(shinythemes)
ui <- fluidPage(
theme = shinytheme("cyborg"),
mainPanel(
DTOutput("table")
)
)
server <- function(input, output){
output$table <- renderDT({
datatable(iris,
style = "bootstrap" # <--------- This is the crucial part
)
})
}
# Create Shiny app ----
shinyApp(ui, server)https://stackoverflow.com/questions/43695515
复制相似问题