【发布时间】:2020-06-11 17:20:30
【问题描述】:
我想在 Shiny 应用程序中为绘图添加滚动条,但只有垂直滚动条出现,而水平滚动条不出现。我在此处附加了一个带有最少元素的小型闪亮应用程序来演示该问题。
cat("\014")
unlink(".RData")
rm(list=ls(all.names = TRUE))
# A basic shiny app with a plotOutput
shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(
),
mainPanel(
column(6,(div(style='width:200px;overflow-x: scroll;height:200px;overflow-y: scroll;',
uiOutput("plot"))) )
)
)
),
server = function(input, output) {
output$plot <- renderUI({
output$plot2 <- renderPlot(plot(cars))
plotOutput('plot2')
})
}
)
【问题讨论】:
标签: r plot shiny scrollbar horizontal-scrolling