在Shinydashboard中设置dashboardSidebar()或dashboardBody()的高度

时间:2019-10-02 17:28:16

标签: r shinydashboard

我下面有一个发光的仪表板,边栏中有许多小部件。

## app.R ##
library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(
sliderInput("slider1", "Number of observations:", 1, 100, 50),
sliderInput("slider2", "Number of observations:", 1, 100, 50),
sliderInput("slider3", "Number of observations:", 1, 100, 50),
sliderInput("slider4", "Number of observations:", 1, 100, 50),
sliderInput("slider5", "Number of observations:", 1, 100, 50),
sliderInput("slider6", "Number of observations:", 1, 100, 50),
sliderInput("slider7", "Number of observations:", 1, 100, 50),
sliderInput("slider8", "Number of observations:", 1, 100, 50),
sliderInput("slider9", "Number of observations:", 1, 100, 50),
sliderInput("slider10", "Number of observations:", 1, 100, 50),
sliderInput("slider11", "Number of observations:", 1, 100, 50),
sliderInput("slider12", "Number of observations:", 1, 100, 50),
),
  dashboardBody()
)

server <- function(input, output) { }

shinyApp(ui, server)

结果,侧边栏的高度变得大于车身高度,并且有点难看。有没有办法增加主体的高度或减小侧边栏的高度以使其均匀?

enter image description here

0 个答案:

没有答案