我是新手,我遇到了一个问题,当网页被切成两半时,我无法查看整个图表和表格。你知道为什么会这样吗?
编辑:我有一个滑块在页面上下移动,但我希望以全分辨率看到它。
示例:
t = data.frame(x = sample(c('a1','b1','b2'), size = 720, replace = TRUE),
date = sample(seq(as.Date('2014-01-01'), as.Date('2016-12-01'), by = 'month'), replace = TRUE, size = 720),
tx = runif(720),
ty = runif(720))
ui <- fluidPage(
# App title
titlePanel("Hello"),
# selector for the graph
shiny::selectInput(inputId = 'selector', label = 'Selector'
,choices = unique(t$x))
)
server <- function(input, output) {
output$graph1 <- renderPlot({
ta = t %>% filter(x== input$selector& date >= '2014-01-01') %>%
group_by(date) %>%
summarise(ty = sum(ty)) %>%
ggplot2::ggplot(data = ta)+
geom_line(aes(x = date, y = ty, colour = 'red'))+
theme_bw()
})
}
shinyApp(ui = ui, server = server)
答案 0 :(得分:0)
我解决了它只是添加
options = list(height = 1080)
在shinyApp命令的末尾,如下所示:
shinyApp(ui = ui, server = server, options = list(height = 1080))