jquery - Prevent column name wrap in shiny DataTable -


i have shiny datatable (package "dt") quite long column names (+ whitespace) want rendered without name wrapping - i.e. colnames wrapped on 2-3 lines. have enabled horizontal scrolling try , facilitate this:

renderdatatable(dataframe_with_long_colnames, ..., options = list(scrollx = true)) 

but default whitespace collapsed new lines.

i think answers question: https://www.datatables.net/forums/discussion/8923/how-do-you-stop-the-header-from-wrapping-into-multiple-rows i'm not sure how translate r function.

in addition, datatable options listed here: https://www.datatables.net/reference/option/

thanks in advance.

in ui.r add following line before line render table:

tags$head(tags$style("#table1  {white-space: nowrap;  }")), 

replace table1 xxxxx output statement in server.r file

output$`xxxxx`<-renderdatatable(..... 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -