Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
501 views
in Technique[技术] by (71.8m points)

r - How to adjust the size of pagination buttons in DT::datatable

I have the following table to which I have made some adjustments, but I would like to know how to decrease the size of the buttons. I found the following help but I am not sure how to implement it, any suggestion is very helpful thanks. How can i adjust the height and width of pagination buttons in jquery datatable and editor data table. Note: I am compiling the table in rmarkdown and I need it to be smaller.

My code

library(DT)
datatable(iris, class = 'cell-border stripe', rownames = TRUE, options = list(pageLength = 10, dom = 'ltipr',
  initComplete = JS("function(settings, json) {","$(this.api().table().header()).css({'font-size': '12px'});","}"))) %>% 
  formatStyle(columns = colnames(.$x$data), `font-size` = '10px') %>%
  formatStyle(0,target= 'row',color = 'black', lineHeight='10%')

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...