我想将闪亮的绘图缩放到窗口的高度.这个相关的SO问题仅使用绝对高度规格(以像素为单位),当a height = 100%更为可取时.我在文档中注意到absolutePanel可以用它的top, bottom, left, right参数实现这一点,但是你丢失了侧面板,并且无论如何情节(缩放到宽度)似乎忽略了可用的高度.
我猜这与html怪癖有关,这意味着你需要用javascript innerHeight变量获得高度.但我不清楚如何实现闪亮的解决方案ui.R以利用它.感谢任何指针.
开发的基本应用程序模型:
ui.R
library(shiny)
shinyServer(
function(input, output) {
output$myplot <- renderPlot({
hist(rnorm(1000))
})
}
)
Run Code Online (Sandbox Code Playgroud)
server.R
library(shiny)
pageWithSidebar(
headerPanel("window height check"),
sidebarPanel(),
mainPanel(
plotOutput("myplot")
)
)
Run Code Online (Sandbox Code Playgroud)