【问题标题】:How to change the width of area around SelectInput in R shiny如何在 R Shiny 中更改 SelectInput 周围区域的宽度
【发布时间】:2015-01-13 18:56:58
【问题描述】:

我在 R 中有一个 SelectInput,它周围有很多空白区域。这是我的 ui.r 中的选择输入:

library(shiny)
shinyUI(pageWithSidebar(
  headerPanel(GetHeader()),

 sidebarPanel(
    selectInput("date", "Select Date:", GetListOfDays(), width="120px")
    #dateInput("date", "Date:", GetListOfDays() ) #value = "2012-02-29")
  ),

  mainPanel(
   uiOutput("plots")
  )

现在,当我运行报告时,我看到:

您是否看到选择输入左侧的所有空白区域?如何修剪或删除它?

谢谢。

【问题讨论】:

  • 这个答案有帮助吗? stackoverflow.com/questions/20343611/…
  • 您好,请参阅我认为无效的编辑,因为我正在使用 pageWithSidebar 并且他有一个自定义的三页内容。
  • 顺便问一下,你是指右边的所有空间吗?只是想确保我理解这个问题......
  • 我想删除按钮右边缘右侧的所有空间

标签: r


【解决方案1】:

函数中似乎有一个width 参数。

library(shiny)
shinyUI(pageWithSidebar(
  headerPanel(GetHeader()),

  sidebarPanel(
    selectInput("date", "Select Date:", GetListOfDays(), width="120px"),
    width = 2 ### EDIT HERE
  ),

  mainPanel(
    uiOutput("plots")
  )

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-01-04
    • 2018-03-29
    • 1970-01-01
    • 2020-08-03
    • 2022-12-17
    • 2021-10-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多