我正在使用带有标签面板的R闪亮仪表板。当使用盒子时,仪表板主体背景会被切断。
这是加载时的页面:
在这里它向下滚动:
如何让身体调整大小,以免它被切断?
这是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(" "),"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')
)
)
)
)
答案 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)