2016-08-05 2 views
0

shyydashboard에서 dygraph와 valueBox 사이에 약간의 비 호환성이 있습니까? ValueBox를 플롯하지 않는 이유는 무엇입니까? 누군가 나를 도울 수 있습니까?Shinydashboard + dygraph + valueBox

## app.R ## 
library(shiny) 
library(shinydashboard) 
library(dygraphs) 


ui <- dashboardPage(
    dashboardHeader(title = "Monitoramento Banco de Dados"),   
    dashboardSidebar(
    sliderInput("DateInput", "Periodo", -30, 0, c(-15, 0), pre = "D.") 
), 
    dashboardBody(
      fluidRow(  
       valueBoxOutput("box_Locks"), 
       valueBoxOutput("box_PLE"), 
       valueBoxOutput("box_CPU") 
      ), 
      fluidRow(
       dygraphOutput("plot1") 
      ) 
     ) 
) 

server <- function(input, output) { 

output$box_Locks <- renderValueBox({ 
    valueBox("7", "Locks", icon = icon("area-chart"), color = "yellow") 
    }) 

    output$box_PLE <- renderValueBox({ 
    valueBox("1500", "PLE", icon = icon("area-chart"), color = "green") 
    }) 

    output$box_CPU <- renderValueBox({ 
    valueBox(paste0(20, "%"), "CPU", icon = icon("area-chart"), color = "red") 
    }) 

    output$plot1 <- renderDygraph({ 
    lungDeaths <- cbind(ldeaths, mdeaths, fdeaths) 
    dyRangeSelector(dygraph(lungDeaths, main = "Deaths from Lung Disease (UK)"), dateWindow = c("1974-01-01", "1980-01-01")) 
    }) 




} 

shinyApp(ui, server) 

버전 :

> R.version.string 
[1] "R version 3.3.1 (2016-06-21)" 
> packageVersion("shiny") 
[1] ‘0.13.2’ 
> packageVersion("shinydashboard") 
[1] ‘0.5.1’ 
> packageVersion("dygraphs") 
[1] ‘1.1.1.0’ 

그리고이 값 상자를 표시하지 왜 결과, 나는 몰라 : enter image description here

답변

0

모든 작업이 측면에서 좋은 :

enter image description here

업데이트 당신의 포장을 먹었습니다. 내 세션 정보와 행운을 확인해보십시오.

sessionInfo()

R version 3.3.1 (2016-06-21) 
Platform: x86_64-w64-mingw32/x64 (64-bit) 
Running under: Windows 7 x64 

attached base packages: 
[1] stats  graphics grDevices utils  datasets methods base  

other attached packages: 
[1] dygraphs_1.1.1-1  shinydashboard_0.5.3 shiny_0.13.2   
[4] ggplot2_2.1.0 
관련 문제