将垂直和水平滚动条添加到R闪亮的DT表中

时间:2017-11-27 07:37:38

标签: r shiny dt shinyapps

请检查右侧的数据表“案例分析详细信息”。我想在框中放置数据表,使其从框中的右边框和下边框对齐,这样我们就可以向DT添加水平和垂直滚动条,可以用来跨越超过框的行。

## app.R ##
library(shiny)
library(shinydashboard)
library(DT)
ui <- dashboardPage(
dashboardHeader(title = "My Chart"),
dashboardSidebar(
width = 0
),
dashboardBody(
box(title = "Data Path", status = "primary",height = "595" ,solidHeader = T,
    plotOutput("trace_plot")),
box( title = "Case Analyses Details", status = "primary", height = 
"595",width = "6",solidHeader = T, 
     div(DT::dataTableOutput("trace_table",width = 220)))
))
server <- function(input, output) 
{ 
#Plot for Trace Explorer
output$trace_plot <- renderPlot({
plot(iris$Sepal.Length,iris$Sepal.Width)
})
output$trace_table <- renderDataTable({
mtcars
})
}
shinyApp(ui, server)

MTCARS CAPTURE

0 个答案:

没有答案