r - 减少 FluidRow 之间的空间
问题描述
我正在尝试以闪亮的方式创建特定的布局,并且我坚持减少 tab1 和 tab5 之间的空间:
下面的代码显示了我尝试过的几件事:
body <- dashboardBody(
fluidRow(
tabBox(
height = "300px",
tabPanel("tab1")
),
tabBox(
height = "600px",
tabPanel("tab2"),
tabPanel("tab3"),
tabPanel("tab4")
)
),
fluidRow(
tabBox(
height = "300px",
tabPanel("tab5")
)
)
)
shinyApp(
ui = dashboardPage(
dashboardHeader(title = "example"),
dashboardSidebar(),
body
),
server = function(input, output) {
}
)
一些帮助将不胜感激
解决方案
也许你正在寻找这个。有关和的更多详细信息,请参见此处。fillRow()
fillCol()
ui <- fillPage(
fillRow( #flex=c(1,1),
fillCol(
div(shinydashboard::tabBox(
height = "300px", width="100%",
tabPanel("tab1", plotOutput("plotTopLeft", height = "300px"))
)),
div(shinydashboard::tabBox(
height = "300px", width="100%",
tabPanel("tab5", plotOutput("plotBottomLeft", height = "300px"))
))
),
fillCol(
shinydashboard::tabBox(
height = "600px", width="100%",
tabPanel("tab2", plotOutput("plotRight", height = "550px")),
tabPanel("tab3"),
tabPanel("tab4")
)
)
)
)
server <- function(input, output) {
output$plotTopLeft <- renderPlot(plot(cars))
output$plotRight <- renderPlot(plot(pressure))
output$plotBottomLeft <- renderPlot(plot(AirPassengers))
}
shinyApp(ui = ui, server = server)
推荐阅读
- sql - 如何在此添加参数,即如果要求我在此 sql 代码中添加参数,请指导?
- python-2.7 - 第 18 行的块标记无效:'endblock'。您是否忘记注册或加载此标签?怎么解决
- android - Android NotificationCompat 不显示标题和内容
- python - 无法安装pygame
- azure-data-factory - 将值调试到变量或用户属性中
- google-maps - 为什么我的谷歌地图搜索落后一个实例?
- php - httpful POST 请求:获取原始 HTTP 消息
- c# - 是否可以从 .EML 文件回复?
- ios - 当我点击不同的标签栏项目时,Lottie 动画停止
- java - 为什么在使用 for-each 时循环变量实际上是 final 的?