R闪亮的仪表板主体尺寸为盒子

时间:2017-09-18 07:02:23

标签: r shiny

我正在使用带有标签面板的R闪亮仪表板。当使用盒子时,仪表板主体背景会被切断。

这是加载时的页面:

enter image description here

在这里它向下滚动:

enter image description here

如何让身体调整大小,以免它被切断?

这是UI代码:

dashboardPage(skin = "green",
  dashboardHeader(title = "Test"),
  dashboardSidebar(
    sidebarMenu(id = "tab",
      menuItem("Explore", tabName = "explore", icon = icon("eye"))
    )
  ),
  dashboardBody(
    tabItems(
      tabItem_explore
    )    
  )
)

tabItem_explore <- 
  tabItem(tabName = "explore",
    h2(icon("eye"), HTML("&nbsp;"),"Explore"), br(),

    tabsetPanel(
      type = "tabs",
      id = "explore_tabset",
      tabPanel(
         'Test', br(),
         h3('Test'), br(),
         plotlyOutput('plot1'), br(),
         box(
           title = "Test",
           status = "primary",
           solidHeader = TRUE,
           plotOutput('plot2')
         ),
         box(
           title = "Test",
           status = "primary",
           solidHeader = TRUE,
           plotlyOutput('plot3')
         ),
         box(
           title = "Test",
           status = "primary",
           solidHeader = TRUE,
           plotlyOutput('plot4')
         )
       )    

     )
   )

1 个答案:

答案 0 :(得分:0)

你可以提到高度和宽度来阻止走出边界,如下所示:

output$Histogram <- renderPlot({
    ggplot(data=melt(df), mapping=aes(x=value)) + 
    geom_histogram(bins=20, col= 'Blue') + 
    facet_wrap (~variable, scales = "free_x")
}, height=499, width=649)