[英]Shrink DT::dataTableOutput Size
我有一個閃亮的界面,我使用DT::dataTableOutput
和DT::renderDataTable
很多。 但是,我想知道是否有辦法縮小數據表的大小,例如,使字體和表格更小。 我該怎么做?
假設我有以下代碼:
foo <- function(){
shinyApp(
ui = fluidPage(
DT::dataTableOutput("table")
),
server <- function(input, output) {
x <- data.frame(1:5, 2:6)
output$table <- DT::renderDataTable(x)
}
)
}
我應該添加哪些選項或標簽?
嘗試將width: 75%
添加到div
style
參數:
div(DT::dataTableOutput("table"), style = "font-size: 75%; width: 75%")
div(DT::dataTableOutput("table"), style = "font-size:50%")
對於較小的字體(在UI中)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.