'R shiny datatable columns width making no sense
I have a shiny app and one page has three tables next to each other as you can see in the attached screenshot. I set the width of each column to be 3 as explained in the shiny documentation and again, as you can see from the screenshot, these tables are too tight even though column = 3 should be enough to avoid tables content to be compressed and printed over multiple rows. I can't customize (and I don't even think I should) the column width to pixel. Is there a basic parameter I'm missing somewhere? Also, why is Shiny printing this horrible bottom border black line for each of these tables? Thank you
ShinyApp(
ui = fluidPage(
fluidRow(column(align = "center",3, DT::dataTableOutput("table1")),
column(align = "center",3, DT::dataTableOutput("table2")),
column(align = "center",3, DT::dataTableOutput("table3")))
),
server <- function(input, output) {
output$table1 <- renderDataTable({
df <- datatable(df,
rownames= F,
caption = 'Call info',
options = list(scrollX = F
, lengthChange = F
, paging = F
, autoWidth = T
, pageLength = 5
, info = F
, searching = F
))
})
output$table2 <- renderDataTable({
df <- datatable(df,
rownames= F,
caption = 'Call info',
options = list(scrollX = F
, lengthChange = F
, paging = F
, autoWidth = T
, pageLength = 5
, info = F
, searching = F
))
})
output$table3 <- renderDataTable({
df <- datatable(df,
rownames= F,
caption = 'Call info',
options = list(scrollX = F
, lengthChange = F
, paging = F
, autoWidth = T
, pageLength = 5
, info = F
, searching = F
))
})
})
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

