【发布时间】:2017-11-24 07:51:54
【问题描述】:
我想用绘图和表格创建shinydashboard,但是当使用tabPanels 时,dataTable 总是在框外。我尝试使用 column 和 width 参数指定面板宽度,但它只影响绘图。
有没有办法限制datatable 使其仅显示在tabPanel 内?
谢谢
使用以下代码呈现选项卡:
dashboardBody(
tabItems(
# First tab content
tabItem(tabName = "dashboard_total_results",
fluidRow(
column(width = 15,
tabBox(
title = "Total deal results",
id = "deal_res_tabset_1", height = "250px",
tabPanel("Total revenue",
plotlyOutput("total_revenue_plot"),
DT::dataTableOutput("total_revenue_table")),
tabPanel("Total orders",
plotlyOutput("total_orders_plot"),
DT::dataTableOutput("total_orders_table")),
tabPanel("Total margin",
plotlyOutput("total_margin_plot"),
DT::dataTableOutput("total_margin_table"))
)
)
)
)
【问题讨论】:
-
你能发布一个可重现的例子吗?
标签: r shinydashboard