2016-07-05 118 views
0

我是新來的閃亮和我遇到一個問題,不讓我查看整個圖形和表格,因爲網頁被切成一半。你知道這是爲什麼嗎?呈現html頁面時的閃亮問題

編輯:我有一個滑塊來上下頁面,但我希望看到它在全分辨率。

例如:

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) 
+1

什麼是't'?這個例子是不可重現的。 –

+0

@PatrickRoocks對不起,我忘了添加數據框架構造。我編輯了我的帖子 – JJ1603

回答

0

我解決它只是加入

options = list(height = 1080) 

在shinyApp命令的末尾,如下所示:

shinyApp(ui = ui, server = server, options = list(height = 1080))