如何在shinyDashboard布局中更改tabPanel宽度?

问题描述

我目前正在使用软件包shinydashboard设计一个Shiny App。

我正在使用tabsetPanel布局,并且无法更改每个tabPanel的宽度,以使绘图适合整个窗口宽度。自变量width = 中的值似乎对其没有影响。

我已经尝试了问题Shiny: How to adjust the width of the tabsetPanel?中给出的所有解决方案,但是这些解决方案都不适合我。

这是我的代码:

library(shiny)
library(shinydashboard)


header<-dashboardHeader(title="Shiny App")

sidebar<-dashboardSidebar()

body<-dashboardBody(
  fluidRow(
  mainPanel(
    tabsetPanel(
      tabPanel("Panel1",box(plotOutput("plot"),height=420,width = 1400)
      )
    )
  )
  )
)

ui<-dashboardPage(header,sidebar,body)

server<-function(input,output) {
  output$plot<-renderPlot({plot(1)})
}

shinyApp(ui,server)

无论width的值是多少,我都拥有tabPanel的大小。我不知道如何更改它。

View of the Shiny App

你能帮我吗?谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)