【问题标题】:formatStyle on data table DT数据表 DT 上的 formatStyle
【发布时间】:2017-11-19 11:59:07
【问题描述】:

如何重命名“显示...条目”术语标签?

谢谢

这里是我使用的代码:

test.table <- data.frame(lapply(1:4, function(x) {1:50}))
names(test.table) <- paste0('cp', 1:4)

shinyServer(function(input,output){

output$table <- DT::renderDataTable({
DT::datatable(test.table, options = list(language = list(
  info = 'Title example...',
  paginate = list(previous = 'Bot', `next` = 'Top')
 ),formatStyle( test.table,'cp1',
   backgroundColor = styleInterval(4, c('green', 
   'red'))
   ),orderClasses = TRUE))

   })

【问题讨论】:

  • 我发现 - DT::datatable(test.table, options = list(language = list( info = 'Calcul des CpK pour l analyze en cours', paginate = list(previous = 'Precedent' , next = 'Suivant')))) %>% formatStyle('cp1',color = styleInterval(c(3.4, 3.8), c('grey', 'blue', 'red'))) %> % formatStyle('cp2',backgroundColor = styleInterval(3.4, c('green', 'red'))) - 我不知道如何更改标签搜索和条目

标签: shiny dt


【解决方案1】:

我们在德语中为 ShinyApp 使用了以下设置

language <- list(
    sEmptyTable =     {if (is.null(emptyTable)) "Keine Daten in der Tabelle vorhanden" else emptyTable },
    sInfo =            "_START_ bis _END_ von _TOTAL_ Einträgen",
    sInfoEmpty =       "0 bis 0 von 0 Einträgen",
    sInfoFiltered =    "(gefiltert von _MAX_ Einträgen)",
    sInfoPostFix =     "",
    sInfoThousands =   ".",
    sLengthMenu =      "_MENU_ Einträge anzeigen",
    sLoadingRecords =  "Wird geladen...",
    sProcessing =      "Bitte warten...",
    sSearch =          "<i class='fa fa-search'></i>",
    sZeroRecords =     "Keine Einträge vorhanden.",
    oPaginate = list(
      sFirst =       "Erste",
      sPrevious =    "Zurück",
      sNext =        "Nächste",
      sLast =        "Letzte"
    )

我相信您正在寻找的是sSearchsLengthMenu

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-10-29
    • 2019-07-28
    • 1970-01-01
    • 2018-09-15
    • 1970-01-01
    • 1970-01-01
    • 2018-05-28
    • 2020-04-20
    相关资源
    最近更新 更多